static void handle_child_exit(int sig)

{

    pid_t pid;

    int status;



    while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {

        FFServerStream *feed;



        for (feed = config.first_feed; feed; feed = feed->next) {

            if (feed->pid == pid) {

                int uptime = time(0) - feed->pid_start;



                feed->pid = 0;

                fprintf(stderr, "%s: Pid %d exited with status %d after %d seconds\n", feed->filename, pid, status, uptime);



                if (uptime < 30)

                    /* Turn off any more restarts */

                    feed->child_argv = 0;

            }

        }

    }



    need_to_start_children = 1;

}

static void handle_child_exit(int sig)

{

    pid_t pid;

    int status;



    while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {

        FFServerStream *feed;



        for (feed = config.first_feed; feed; feed = feed->next) {

            if (feed->pid == pid) {

                int uptime = time(0) - feed->pid_start;



                feed->pid = 0;

                fprintf(stderr, "%s: Pid %d exited with status %d after %d seconds\n", feed->filename, pid, status, uptime);



                if (uptime < 30)

                    

                    feed->child_argv = 0;

            }

        }

    }



    need_to_start_children = 1;

}

                    feed->child_argv = 0;
static void FUNC_0(int VAR_0)

{

    pid_t pid;

    int VAR_1;



    while ((pid = waitpid(-1, &VAR_1, WNOHANG)) > 0) {

        FFServerStream *feed;



        for (feed = config.first_feed; feed; feed = feed->next) {

            if (feed->pid == pid) {

                int uptime = time(0) - feed->pid_start;



                feed->pid = 0;

                fprintf(stderr, "%s: Pid %d exited with VAR_1 %d after %d seconds\n", feed->filename, pid, VAR_1, uptime);



                if (uptime < 30)

                    

                    feed->child_argv = 0;

            }

        }

    }



    need_to_start_children = 1;

}

static void FUNC_0(int VAR_0)
{ pid_t pid; int VAR_1; while ((pid = waitpid(-1, &VAR_1, WNOHANG)) > 0) { FFServerStream *feed; for (feed = config.first_feed; feed; feed = feed->next) { if (feed->pid == pid) { int uptime = time(0) - feed->pid_start; feed->pid = 0; fprintf(stderr, "%s: Pid %d exited with VAR_1 %d after %d seconds\n", feed->filename, pid, VAR_1, uptime); if (uptime < 30)
feed->child_argv = 0; } } } need_to_start_children = 1; }