Package: manpages-dev Version: 1.17-3 In article <[EMAIL PROTECTED]> you wrote: > Topi Miettinen <[EMAIL PROTECTED]> writes: >> open("/dev/null", O_RDWR); >> open("/dev/null", O_RDWR); >> open("/dev/null", O_RDWR); >> >> for fake std{in,out,err}
> Presumably the daemon isn't using stdin, stdout, and stderr, so you > don't need to do this. And you're not guaranteed to get the lowest > fd, even though you probably will. You should use dup/dup2 to get > specific fds. Oh yes open does guarantee the lowest file descriptor. Someone should modify our open(2) to reflect this. In fact, I'm filing a bug report about this right now. -- Debian GNU/Linux 1.3 is out! ( http://www.debian.org/ ) Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt