* winsup.api/systemcall.c (main): Ensure that stdin is redirected.
This commit is contained in:
parent
9737b9b4de
commit
27d01a7217
@ -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.
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user