1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-12-04 14:46:30 -05:00

-b was broken. Fix it.

svn path=/icecast/trunk/icecast/; revision=7509
This commit is contained in:
Michael Smith 2004-08-10 05:17:56 +00:00
parent ebebad5e74
commit 490e64663c

View File

@ -128,7 +128,6 @@ static void _shutdown_subsystems(void)
static int _parse_config_opts(int argc, char **argv, char *filename, int size)
{
int i = 1;
int processID = 0;
int config_ok = 0;
@ -137,12 +136,16 @@ static int _parse_config_opts(int argc, char **argv, char *filename, int size)
while (i < argc) {
if (strcmp(argv[i], "-b") == 0) {
#ifndef WIN32
pid_t pid;
fprintf(stdout, "Starting icecast2\nDetaching from the console\n");
if ((processID = (int)fork()) > 0) {
pid = fork();
if (pid > 0) {
/* exit the parent */
exit(0);
}
else {
else if(pid < 0) {
fprintf(stderr, "FATAL: Unable to fork child!");
exit(1);
}