raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=8931a333eb9b6a1a831bc8442cb5a2abfee2fff2

commit 8931a333eb9b6a1a831bc8442cb5a2abfee2fff2
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Sun Apr 19 00:39:51 2020 +0100

    e system - handle /dev/null not opening
    
    fix CID 1425222
---
 src/bin/system/e_system_inout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/system/e_system_inout.c b/src/bin/system/e_system_inout.c
index 933821c31..f4353122c 100644
--- a/src/bin/system/e_system_inout.c
+++ b/src/bin/system/e_system_inout.c
@@ -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

-- 


Reply via email to