e system - handle /dev/null not opening

fix CID 1425222
This commit is contained in:
Carsten Haitzler 2020-04-19 00:39:51 +01:00
parent f9454fcb65
commit 8931a333eb
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ _stdout_off(void)
fflush(stdout);
fd_supress = dup(1);
if (fd_null == -1) fd_null = open("/dev/null", O_WRONLY);
dup2(fd_null, 1);
if (fd_null != -1) dup2(fd_null, 1);
}
static void