diff options
Diffstat (limited to 'init.c')
-rw-r--r-- | init.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -430,6 +430,13 @@ extern int init_main(int argc, char **argv) | |||
430 | #endif | 430 | #endif |
431 | 431 | ||
432 | 432 | ||
433 | #ifndef DEBUG_INIT | ||
434 | if (getpid() != 1) { | ||
435 | usage( "init\n\nInit is the parent of all processes.\n\n" | ||
436 | "This version of init is designed to be run only by the kernel\n"); | ||
437 | } | ||
438 | #endif | ||
439 | |||
433 | /* Check if we are supposed to be in single user mode */ | 440 | /* Check if we are supposed to be in single user mode */ |
434 | if ( argc > 1 && (!strcmp(argv[1], "single") || | 441 | if ( argc > 1 && (!strcmp(argv[1], "single") || |
435 | !strcmp(argv[1], "-s") || !strcmp(argv[1], "1"))) { | 442 | !strcmp(argv[1], "-s") || !strcmp(argv[1], "1"))) { |