I'm not sure what the root cause is, but printf writes to fd 0:
mandarine:/usr/src/packages/BUILD/udev-015/klibc# ./utils/true
blah
mandarine:/usr/src/packages/BUILD/udev-015/klibc# ./utils/true >/dev/null
blah
mandarine:/usr/src/packages/BUILD/udev-015/klibc# cat utils/true.c
#include <stdio.h>
int main(void)
{
printf("blah\n");
return 0;
}
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n?RNBERG
On Tue, Jan 27, Olaf Hering wrote:> > I'm not sure what the root cause is, but printf writes to fd 0:printf calls _fwrite with *f = 0x1, fileno decrements it and fd for write becomes 0. -- USB is for mice, FireWire is for men! sUse lINUX ag, n?RNBERG