* winsup.api/systemcall.c (main): Ensure that stdin is redirected.

This commit is contained in:
Christopher Faylor 2002-02-27 23:01:10 +00:00
parent 9737b9b4de
commit 27d01a7217
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-02-27 Christopher Faylor <cgf@redhat.com>
* winsup.api/systemcall.c (main): Ensure that stdin is redirected.
2001-11-18 Egor Duda <deo@logos-m.ru>
* winsup.api/pthread/condvar3_1.c: Fix debugging output.

View File

@ -10,6 +10,13 @@ main (int argc, char **argv)
int fds[2];
static char buf[4096];
close (0);
if ((fd = open ("/dev/null", O_WRONLY)) != 0)
{
fprintf (stderr, "couldn't redirect stdin to /dev/null, fd %d - %s\n", fd, strerror ());
exit (1);
}
close (1);
if ((fd = open ("/dev/null", O_WRONLY)) != 1)
{