summaryrefslogtreecommitdiffstats
path: root/tools/syslogd.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-01-18 14:51:33 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-01-18 14:51:33 +0100
commit03be2fcd7cfe3355b8108fe8368a6a65ab98e9e9 (patch)
tree5b56babfece1bc2f5e3ee6cbf030859b72232eca /tools/syslogd.c
parentac9afc4149db314d9c480232d70216960342e3e4 (diff)
parentef34821a2737799f48c3032b9616418e4f7fa34f (diff)
downloadrsyslog-03be2fcd7cfe3355b8108fe8368a6a65ab98e9e9.tar.gz
rsyslog-03be2fcd7cfe3355b8108fe8368a6a65ab98e9e9.tar.xz
rsyslog-03be2fcd7cfe3355b8108fe8368a6a65ab98e9e9.zip
Merge branch 'v5-devel' into master
Conflicts: ChangeLog Makefile.am configure.ac doc/manual.html plugins/imptcp/imptcp.c plugins/imudp/imudp.c plugins/imuxsock/imuxsock.c runtime/parser.c template.c tools/omfwd.c tools/syslogd.c
Diffstat (limited to 'tools/syslogd.c')
-rw-r--r--tools/syslogd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index a24bef68..4cfbd377 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -356,8 +356,15 @@ void untty(void)
#else
{
int i;
+ pid_t pid;
if(!Debug) {
+ pid = getpid();
+ if (setpgid(pid, pid) < 0) {
+ perror("setpgid");
+ exit(1);
+ }
+
i = open(_PATH_TTY, O_RDWR|O_CLOEXEC);
if (i >= 0) {
# if !defined(__hpux)
@@ -1382,7 +1389,6 @@ static void printVersion(void)
}
-
/* Method to initialize all global classes and use the objects that we need.
* rgerhards, 2008-01-04
* rgerhards, 2008-04-16: the actual initialization is now carried out by the runtime