From: Michael Meffie Date: Wed, 2 Sep 2015 20:28:43 +0000 (-0400) Subject: volser: convert the volume server to opr softsig X-Git-Tag: upstream/1.8.0_pre1^2~129 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=e0d7f9b591db66fd33b7e98f669b2e4ff9decf1c;p=packages%2Fo%2Fopenafs.git volser: convert the volume server to opr softsig Convert the volume server from regular signal handling to the opr soft signal handling when built with pthreads. This makes it safe to call pthread functions within signal handlers. Change-Id: I25b9a9184c526f4ce9b6e2abb25ae9135cc97ec6 Reviewed-on: https://gerrit.openafs.org/11995 Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- diff --git a/src/volser/volmain.c b/src/volser/volmain.c index cf16ac93c..e38521432 100644 --- a/src/volser/volmain.c +++ b/src/volser/volmain.c @@ -14,6 +14,8 @@ #include #ifdef AFS_PTHREAD_ENV # include +# include +# include /* must come after softsig */ #endif #ifdef AFS_NT40_ENV @@ -501,7 +503,12 @@ main(int argc, char **argv) rx_SetRxDeadTime(420); memset(busyFlags, 0, sizeof(busyFlags)); +#ifdef AFS_PTHREAD_ENV + opr_softsig_Init(); + SetupLogSoftSignals(); +#else SetupLogSignals(); +#endif { #ifdef AFS_PTHREAD_ENV