mirror of https://github.com/vitalif/e2fsprogs
unix.c, ChangeLog:
unix.c (reserve_stdio_fds): Add safety check in case reserve_stdio_fds couldn't open /dev/null.bitmap-optimize
parent
4eca93be21
commit
75d83bec5f
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue