Re: Why does close_stdout close stdout and stderr?

2019-05-08 Thread NeilBrown
omething like that. Are there any non-Linux kernels ??? Seriously though, I suspect it would work on any Unix-like kernel. It certainly doesn't hurt, so there is no need to protect it with the #ifdef. NeilBrown signature.asc Description: PGP signature

Re: Why does close_stdout close stdout and stderr?

2019-05-07 Thread NeilBrown
file systems (NFS and CODA) buffer written/flushed data >until an actual close call. You can achieve that "actual close call" using error = close(dup(fileno(stdout))); so you don't actually need to "fclose" if you don't want to. Any 'close' will do, it doesn't have to be the "last close". NeilBrown signature.asc Description: PGP signature