X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=server.c;h=7171c6e2814808ae19132f9a4c199485536bd727;hb=97f53e18953fc2013c0b14f0261ac385e45b0284;hp=e94de736f81b9508739dbf0f4c38c180ede29fdb;hpb=12197992573eb1314424deaedc677e0d42703e1d;p=paraslash.git diff --git a/server.c b/server.c index e94de736..7171c6e2 100644 --- a/server.c +++ b/server.c @@ -15,6 +15,9 @@ * */ +#include +#include +#include #include "para.h" #include "server.cmdline.h" @@ -350,7 +353,7 @@ out: uint32_t afs_socket_cookie; static int afs_socket; -pid_t afs_pid; +static pid_t afs_pid; static void init_afs(void) { @@ -441,6 +444,8 @@ static void handle_sighup(void) mmd->selector_change = mmd->selector_num; /* do not change selector.. */ change_selector(); /* .. just reload */ init_user_list(user_list_file); /* reload user list */ + if (afs_pid) + kill(afs_pid, SIGHUP); } static void status_refresh(void) @@ -535,8 +540,8 @@ repeat: break; case SIGCHLD: for (;;) { - pid = para_reap_child(); - if (pid <= 0) + ret = para_reap_child(&pid); + if (ret <= 0) break; if (pid != afs_pid) continue;