Introduction
Introduction Statistics Contact Development Disclaimer Help
Unblock signals before exec - sinit - suckless init
git clone git://git.suckless.org/sinit
Log
Files
Refs
README
LICENSE
---
commit 514b100944d0b61d8e8a295ab3cd534be4cfd344
parent 9246a13738fc21d08aab20382b67c5dadb4ff8ae
Author: sin <[email protected]>
Date: Mon, 10 Feb 2014 14:53:51 +0000
Unblock signals before exec
Diffstat:
M sinit.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/sinit.c b/sinit.c
@@ -26,11 +26,12 @@ static struct {
#include "config.h"
+static sigset_t set;
+
int
main(void)
{
struct signalfd_siginfo si;
- sigset_t set;
int fd;
int i;
ssize_t n;
@@ -93,6 +94,7 @@ spawn(char *const argv[])
if (pid < 0) {
weprintf("sinit: fork:");
} else if (pid == 0) {
+ sigprocmask(SIG_UNBLOCK, &set, NULL);
setsid();
setpgid(0, 0);
execvp(argv[0], argv);
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.