search for: ndetach

Displaying 1 result from an estimated 1 matches for "ndetach".

Did you mean: detach
2004 Aug 06
2
[PATCH] main.c: use pid_t and cleanup command line opts parsing.
...*filename, int size) { int i = 1; - int processID = 0; + +#ifndef WIN32 + pid_t processID; +#endif if (argc < 2) return -1; while (i < argc) { if (strcmp(argv[i], "-b") == 0) { #ifndef WIN32 - fprintf(stdout, "Starting icecast2\nDetaching from the console\n"); - if ((processID = (int)fork()) > 0) { + fprintf(stdout, "Detaching from the console...\n"); + + if ((processID = fork()) > 0) /* exit the parent */ - _exit(0); + exit(0); +...