Introduction
Introduction Statistics Contact Development Disclaimer Help
Allow fifopath to be NULL - sinit - suckless init
git clone git://git.suckless.org/sinit
Log
Files
Refs
README
LICENSE
---
commit 23dbb870c7ad1d82a5c2a967683158da54ab3469
parent 747b2bfdceb94ff45b7ced747cbe3458d26dc6a8
Author: sin <[email protected]>
Date: Fri, 7 Feb 2014 11:41:55 +0000
Allow fifopath to be NULL
In that case we do not use the FIFO at all.
Diffstat:
M config.def.h | 1 +
M sinit.c | 3 +++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/config.def.h b/config.def.h
@@ -6,6 +6,7 @@ static Arg rcinitarg = { .v = rcinitcmd };
static const char *rcrebootcmd[] = { "/bin/rc.shutdown", "reboot", NULL };
static const char *rcpoweroffcmd[] = { "/bin/rc.shutdown", "poweroff", NULL };
+/* if you make this path NULL, then sinit will not use a FIFO */
static const char *fifopath = "/var/run/sinit.fifo";
static Command commands[] = {
{ "poweroff", spawn, { .v = rcpoweroffcmd } },
diff --git a/sinit.c b/sinit.c
@@ -54,6 +54,9 @@ main(void)
spawn(&rcinitarg);
+ if (!fifopath)
+ return EXIT_SUCCESS;
+
unlink(fifopath);
umask(0);
if (mkfifo(fifopath, 0600) < 0)
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.