[Lazarus] Use /dev/null for stdout

Martin Frb lazarus at mfriebe.de
Wed Oct 24 13:07:22 CEST 2018

On 23/10/2018 23:42, Martin Grajcar via Lazarus wrote:
> My process may get started with or without console. In the latter 
> case, any write leads to "Disk full" on MacOS. As I can't eliminate 
> all writes, I'd need to open both stdout and stderr as /dev/null.

Have a look at logger frameworks.

LazLogger is included: http://wiki.lazarus.freepascal.org/LazLogger
Use "debugln" instead of "writeln". debugln will test if stdout is open 
or not.

There are still cases where stdout can return a "disk full", those are 
(in the latest version) caught and ignored.

More information about the Lazarus mailing list