X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=init-ng.c;h=7dba91aeb3aa375fcbad2410753ba6928d9733c1;hb=HEAD;hp=3b969be0e62235aa03ee59df65cc1f0e173d1d9d;hpb=9f23f04c3792ce4c64fec9f1b8116e0586f50ce0;p=init-ng diff --git a/init-ng.c b/init-ng.c index 3b969be..7dba91a 100644 --- a/init-ng.c +++ b/init-ng.c @@ -10,21 +10,20 @@ // (C) 2017 Underground Software // -#define _GNU_SOURCE // Without this, functions in unistd.h go missing #include #include #include #include #include #include -#include +#include #include -#include +#include #include #include #include -static const char socketPath[] = "/run/initctl"; +static const char fifoPath[] = "/dev/initctl"; static int shuttingDown = 0; static int verbose = 0; // N.B.: There is no mechanism to set this ATM static struct sigaction action; @@ -39,7 +38,7 @@ static char * args[256]; // 256 arguments ought to be enough for anybody ;-) // Find a process in the monitored process list (MPL) by PID. Returns the index // of the entry in the MPL. // -int FindMonitoredPID(pid_t pid) +static int FindMonitoredPID(pid_t pid) { for(int i=0; i