[pkg-fso-commits] [SCM] Automatic Display Manager branch, master, updated. debian/0.8-1-20-g71c15d0

Enrico Zini enrico at enricozini.org
Sat Jul 9 09:37:37 UTC 2011


The following commit has been merged in the master branch:
commit 2c4dcd3f6a313d5cb82eb4b24d2b487977a515a0
Author: Enrico Zini <enrico at enricozini.org>
Date:   Sat Jul 9 10:31:35 2011 +0100

    Some cargoculting from xinit

diff --git a/xserver.c b/xserver.c
index 9e61c40..7f01364 100644
--- a/xserver.c
+++ b/xserver.c
@@ -143,10 +143,17 @@ int nodm_xserver_start(struct nodm_xserver* srv)
         // Stop the logging subsystem before we quit via exec
         log_end();
 
+        // don't hang on read/write to control tty (from xinit)
+        signal(SIGTTIN, SIG_IGN);
+        signal(SIGTTOU, SIG_IGN);
+
         // Ignore SIGUSR1 to signal the X server that it should send us SIGUSR1
         // when ready
         signal(SIGUSR1, SIG_IGN);
 
+        // prevent the server from getting sighup from vhangup() (from xinit)
+        setpgid(0, getpid());
+
         execv(srv->argv[0], (char *const*)srv->argv);
         log_err("cannot start %s: %m", srv->argv[0]);
         exit(errno == ENOENT ? E_CMD_NOTFOUND : E_CMD_NOEXEC);
diff --git a/xsession.c b/xsession.c
index 83f5538..aee18ac 100644
--- a/xsession.c
+++ b/xsession.c
@@ -119,6 +119,8 @@ int nodm_xsession_start(struct nodm_xsession* s, struct nodm_xserver* srv)
         // Restore the original signal mask
         if (sigprocmask(SIG_SETMASK, &s->orig_signal_mask, NULL) == -1)
             log_err("sigprocmask failed: %m");
+        // cargogulted from xinit
+        setpgid(0, getpid());
 
         // child shell */
         if (s->child_body)

-- 
Automatic Display Manager



More information about the pkg-fso-commits mailing list