Am 02/19/17 um 19:47 schrieb Christian Schulte:
> Am 02/19/17 um 13:06 schrieb Michael Osipov:
>> Socket give you, of course, a lot of control, but they also impose an 
>> overhead compares to named pipes (mkfifo, CreateNamePipe).
>>
>> I think our biggest problem is that stdout is subject to buffering 
>> issues and in case if System#exit() status Z is the buffer, never 
>> written out.
>> Surefire thinks that the crashed.
> 
> Not sure I understand the issue at hand completely. If the code calling
> "exit" is in Surefire and the code consuming the stdout/stderr streams
> also is in Surefire, there is a solution to this. Can we just close the
> stdio streams before calling exit? Would that be possible? Just add
> System.out.close(), System.err.close() and System.in.close() before the
> call to System.exit(). This could solve it. Will look up posix
> documentation on this now. We maybe are just running into an issue where
> the BSDs get it right and others are not strictly posix compliant.
> Getting someone to test this on OSX would be interesting (kernel or
> userland issue). This could even be a bug in the VM (not platform
> independent).
> 
> Regards,
> 

Quoting from here:

<http://man.openbsd.org/OpenBSD-current/man3/stdio.3>

"A file is disassociated from a stream by “closing” it. Output streams
are flushed (any unwritten buffer contents are transferred to the host
environment) before the stream is disassociated from the file."

BUGs section has a hint about buffering as well.

Regards,
-- 
Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to