FreeBSD Bugzilla – Attachment 13346 Details for
Bug 25462
daemon(3) fails if called by a session leader
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 839 bytes, created by
mkamm
on 2001-02-28 21:50:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
mkamm
Created:
2001-02-28 21:50:01 UTC
Size:
839 bytes
patch
obsolete
>Index: daemon.c >=================================================================== >RCS file: /home/ncvs/src/lib/libc/gen/daemon.c,v >retrieving revision 1.4 >diff -u -r1.4 daemon.c >--- daemon.c 2001/01/24 12:59:21 1.4 >+++ daemon.c 2001/02/28 19:32:40 >@@ -41,6 +41,7 @@ > #include <fcntl.h> > #include <paths.h> > #include <unistd.h> >+#include <signal.h> > #include "un-namespace.h" > > int >@@ -48,7 +49,13 @@ > int nochdir, noclose; > { > int fd; >+ struct sigaction sa_ign, sa_save; >+ pid_t newgrp; > >+ sa_ign.sa_handler = SIG_IGN; >+ sa_ign.sa_flags = 0; >+ (void) sigaction(SIGHUP, &sa_ign, &sa_save); >+ > switch (fork()) { > case -1: > return (-1); >@@ -58,7 +65,9 @@ > _exit(0); > } > >- if (setsid() == -1) >+ newgrp = setsid(); >+ (void) sigaction(SIGHUP, &sa_save, (struct sigaction *) 0); >+ if (newgrp == -1) > return (-1); > > if (!nochdir)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25462
: 13346