"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "process.c" between
minidlna-1.2.1.tar.gz and minidlna-1.3.0.tar.gz

About: ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients.

process.c  (minidlna-1.2.1):process.c  (minidlna-1.3.0)
skipping to change at line 41 skipping to change at line 41
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>
#include <sys/wait.h> #include <sys/wait.h>
#include "config.h"
#include "event.h"
#include "upnpglobalvars.h" #include "upnpglobalvars.h"
#include "process.h" #include "process.h"
#include "config.h"
#include "log.h" #include "log.h"
struct child *children = NULL; struct child *children = NULL;
int number_of_children = 0; int number_of_children = 0;
static void static void
add_process_info(pid_t pid, struct client_cache_s *client) add_process_info(pid_t pid, struct client_cache_s *client)
{ {
struct child *child; struct child *child;
int i; int i;
skipping to change at line 103 skipping to change at line 104
return -1; return -1;
} }
pid_t pid = fork(); pid_t pid = fork();
if (pid > 0) if (pid > 0)
{ {
if (client) if (client)
client->connections++; client->connections++;
add_process_info(pid, client); add_process_info(pid, client);
number_of_children++; number_of_children++;
} } else if (pid == 0)
DPRINTF(E_FATAL, L_GENERAL, "Fork() failed: %s\n", strerror(errno
return pid; return pid;
} }
void void
process_handle_child_termination(int signal) process_handle_child_termination(int signal)
{ {
pid_t pid; pid_t pid;
while ((pid = waitpid(-1, NULL, WNOHANG))) while ((pid = waitpid(-1, NULL, WNOHANG)))
 End of changes. 3 change blocks. 
2 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)