mirror of https://github.com/xzeldon/htop.git
CRT: close backup stderr file after reset
Close the backup file descriptor of original stderr once it has been restored at stderr.
This commit is contained in:
parent
589b0733d9
commit
38e6136b82
2
CRT.c
2
CRT.c
|
@ -772,6 +772,8 @@ static void dumpStderr(void) {
|
||||||
|
|
||||||
fsync(STDERR_FILENO);
|
fsync(STDERR_FILENO);
|
||||||
dup2(stderrRedirectBackupFd, STDERR_FILENO);
|
dup2(stderrRedirectBackupFd, STDERR_FILENO);
|
||||||
|
close(stderrRedirectBackupFd);
|
||||||
|
stderrRedirectBackupFd = -1;
|
||||||
lseek(stderrRedirectNewFd, 0, SEEK_SET);
|
lseek(stderrRedirectNewFd, 0, SEEK_SET);
|
||||||
|
|
||||||
bool header = false;
|
bool header = false;
|
||||||
|
|
Loading…
Reference in New Issue