Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 256149 Details for
Bug 319865
"/etc/init.d/killprocs: send: Bad file descriptor" on shutdown sys-apps/openrc-0.6.1-r1
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Avoid race condition when closing pipe in runscript.c
runscript-pipe-close-race.patch (text/plain), 838 bytes, created by
Thomas Pfaff
on 2010-12-02 12:16:04 UTC
(
hide
)
Description:
Avoid race condition when closing pipe in runscript.c
Filename:
MIME Type:
Creator:
Thomas Pfaff
Created:
2010-12-02 12:16:04 UTC
Size:
838 bytes
patch
obsolete
>diff -urp src.org/rc/runscript.c src/rc/runscript.c >--- src.org/rc/runscript.c 2010-11-21 18:08:53.000000000 +0100 >+++ src/rc/runscript.c 2010-12-02 11:00:29.000000000 +0100 >@@ -350,6 +350,8 @@ svc_exec(const char *arg1, const char *a > size_t bytes; > bool prefixed = false; > int slave_tty; >+ sigset_t sigchldmask; >+ sigset_t oldmask; > > /* Setup our signal pipe */ > if (pipe(signal_pipe) == -1) >@@ -439,10 +441,17 @@ svc_exec(const char *arg1, const char *a > } > > free(buffer); >+ >+ sigemptyset (&sigchldmask); >+ sigaddset (&sigchldmask, SIGCHLD); >+ sigprocmask (SIG_BLOCK, &sigchldmask, &oldmask); >+ > close(signal_pipe[0]); > close(signal_pipe[1]); > signal_pipe[0] = signal_pipe[1] = -1; > >+ sigprocmask (SIG_SETMASK, &oldmask, NULL); >+ > if (master_tty >= 0) { > /* Why did we do this? */ > /* signal (SIGWINCH, SIG_IGN); */
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 319865
: 256149