[sane-devel] [PATCH] Do not accidentally close STDIN/STDOUT/STDERR

Julien BLACHE jb at jblache.org
Fri Aug 1 09:08:34 UTC 2008

Nick Andrew <nick at nick-andrew.net> wrote:


> When /dev/null is opened it gets the lowest numbered unopened
> file descriptor. If any of the file descriptors 0, 1 or 2 are
> closed when the program starts running, the later close()
> will cause that file descriptor to be closed, which is not
> wanted.

There is no reason why this would happen, so unless you've seen that
actually happening...


Julien BLACHE                                   <http://www.jblache.org> 
<jb at jblache.org>                                  GPG KeyID 0xF5D65169

More information about the sane-devel mailing list