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.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to