unix.c, ChangeLog:

unix.c (reserve_stdio_fds): Add safety check in case reserve_stdio_fds
  	couldn't open /dev/null.
bitmap-optimize
Theodore Ts'o 1999-05-18 03:16:36 +00:00
parent 4eca93be21
commit 75d83bec5f
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
1999-05-17 <tytso@rsts-11.mit.edu>
* unix.c (reserve_stdio_fds): Add safety check in case
reserve_stdio_fds couldn't open /dev/null.
1999-03-14 Theodore Ts'o <tytso@rsts-11.mit.edu>
* util.c (print_resource_track): Use mallinfo if present to get

View File

@ -254,6 +254,11 @@ static void reserve_stdio_fds(NOARGS)
fd = open("/dev/null", O_RDWR);
if (fd > 2)
break;
if (fd < 0) {
fprintf(stderr, "ERROR: Couldn't open /dev/null (%s)\n",
strerror(errno));
break;
}
}
close(fd);
}