mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
[MINOR] don't close stdio fds twice
This minor harmless bug dates back to v1.1. When fclose() was added, the close() calls were not removed, so the fds 0,1,2 are closed twice.
This commit is contained in:
parent
d79e79b436
commit
1700b9c3d5
1 changed files with 0 additions and 2 deletions
|
|
@ -980,7 +980,6 @@ int main(int argc, char **argv)
|
|||
if ((global.mode & MODE_QUIET) && !(global.mode & MODE_VERBOSE)) {
|
||||
/* detach from the tty */
|
||||
fclose(stdin); fclose(stdout); fclose(stderr);
|
||||
close(0); close(1); close(2);
|
||||
}
|
||||
|
||||
/* open log & pid files before the chroot */
|
||||
|
|
@ -1158,7 +1157,6 @@ int main(int argc, char **argv)
|
|||
if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
|
||||
/* detach from the tty */
|
||||
fclose(stdin); fclose(stdout); fclose(stderr);
|
||||
close(0); close(1); close(2); /* close all fd's */
|
||||
global.mode &= ~MODE_VERBOSE;
|
||||
global.mode |= MODE_QUIET; /* ensure that we won't say anything from now */
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue