diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2018-09-09 21:52:37 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2018-09-09 21:52:37 +0200 |
commit | b15b11245cd774b0ef83718ac20b9eb8ff1c3d82 (patch) | |
tree | ce98d0c72b13db62cffe0d38d587a51ba2d9ea1a /src/potd-init.c | |
parent | f4953726c2ec31c720605f733b921bed32a88f4c (diff) |
fake /sbin/init skeleton
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'src/potd-init.c')
-rw-r--r-- | src/potd-init.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/potd-init.c b/src/potd-init.c new file mode 100644 index 0000000..8cfb347 --- /dev/null +++ b/src/potd-init.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <sys/types.h> + +#define APP_NAME "init" + +int main(void) +{ + if (getppid() != 0 || getpid() != 1) { + fprintf(stderr, "%s: must be started as PID 1\n", APP_NAME); + return 1; + } + + return 0; +} |