[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 27/70: daemons: fix setsid(2) in console-run
From: |
Samuel Thibault |
Subject: |
[hurd] 27/70: daemons: fix setsid(2) in console-run |
Date: |
Mon, 16 Sep 2013 07:41:39 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 7f76449a4f7b2d027fa6c085ba931129e16f4fb4
Author: Justus Winter <address@hidden>
Date: Thu Aug 15 09:37:54 2013 +0200
daemons: fix setsid(2) in console-run
Only run setsid(2) if the process is not already the group leader.
* daemons/console-run.c (open_console): Fix setsid(2).
---
daemons/console-run.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/daemons/console-run.c b/daemons/console-run.c
index fb879e5..e1bfe64 100644
--- a/daemons/console-run.c
+++ b/daemons/console-run.c
@@ -217,8 +217,9 @@ open_console (char **namep)
dup2 (0, 1);
dup2 (0, 2);
- if (setsid () == -1)
- error (0, errno, "setsid");
+ if (getsid (0) != getpid ())
+ if (setsid () == -1)
+ error (0, errno, "setsid");
/* Set the console to our pgrp. */
tcsetpgrp (0, getpid ());
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (de8b182 -> b2f8745), Samuel Thibault, 2013/09/16
- [hurd] 03/70: utils: escape arguments in fakeroot.sh, Samuel Thibault, 2013/09/16
- [hurd] 17/70: console-client: add daemonizing support, Samuel Thibault, 2013/09/16
- [hurd] 21/70: utils: add nullauth utility, Samuel Thibault, 2013/09/16
- [hurd] 22/70: Disable transparent gzip/bzip2 decompression, Samuel Thibault, 2013/09/16
- [hurd] 19/70: trans: drop privileges in the null translator, Samuel Thibault, 2013/09/16
- [hurd] 35/70: proc: add proc_mark_important server code, Samuel Thibault, 2013/09/16
- [hurd] 20/70: tmpfs: drop privileges in the tmpfs translator, Samuel Thibault, 2013/09/16
- [hurd] 27/70: daemons: fix setsid(2) in console-run,
Samuel Thibault <=
- [hurd] 14/70: Optimize translator string copy, Samuel Thibault, 2013/09/16
- [hurd] 13/70: libnetfs: properly respond to file_get_translator requests, Samuel Thibault, 2013/09/16
- [hurd] 23/70: Do not build gzip/bzip2 support, Samuel Thibault, 2013/09/16
- [hurd] 38/70: libdiskfs: register libdiskfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 34/70: proc: make the function check_owner available, Samuel Thibault, 2013/09/16
- [hurd] 24/70: exec: Remove #ifdef 0-out code for user specified exec servers., Samuel Thibault, 2013/09/16
- [hurd] 40/70: libtrivfs: register libtrivfs-based translators as important, Samuel Thibault, 2013/09/16
- [hurd] 36/70: hurd: add proc_mark_important, Samuel Thibault, 2013/09/16
- [hurd] 43/70: Fix build, Samuel Thibault, 2013/09/16
- [hurd] 46/70: proc: keep track of {start,end}_code, Samuel Thibault, 2013/09/16