derekf pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=40e8bb044c049d7a3a16f61aebef6ea6977509ce

commit 40e8bb044c049d7a3a16f61aebef6ea6977509ce
Author: Derek Foreman <der...@osg.samsung.com>
Date:   Fri Sep 22 20:57:07 2017 -0500

    Set close on exec for stdin
    
    ref T5606
---
 src/bin/e_main.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index 98676ca18..a69371126 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -233,6 +233,16 @@ main(int argc, char **argv)
 #endif
    TS("Begin Startup");
 
+   /* When running as a wayland compositor, if a child process has
+    * access to stdin it can issue some pretty sketchy ioctl()s
+    * and mess with the console.  So let's just set close_on_exec.
+    * It may be better to fix this in EFL's ecore_exe_run in some
+    * way, but it will be a while until a stable EFL release has
+    * it sorted...
+    */
+   eina_file_close_on_exec(STDIN_FILENO, EINA_TRUE);
+   /* </HULK SMASH> */
+
    /* trap deadly bug signals and allow some form of sane recovery */
    /* or ability to gdb attach and debug at this point - better than your */
    /* wm/desktop vanishing and not knowing what happened */

-- 


Reply via email to