143 |
* it. If the service listens on a port try to connect to the port and |
* it. If the service listens on a port try to connect to the port and |
144 |
* test the stated protocol at the port. If any of the various tests |
* test the stated protocol at the port. If any of the various tests |
145 |
* fails then do the specified action on the service. |
* fails then do the specified action on the service. |
|
* |
|
|
* We block for the signals SIGTERM while in this function. |
|
146 |
*/ |
*/ |
147 |
static void do_validate(Service_T s, ProcessTree_T * pt, int treesize) { |
static void do_validate(Service_T s, ProcessTree_T * pt, int treesize) { |
148 |
|
|
156 |
return; |
return; |
157 |
} |
} |
158 |
|
|
159 |
/* Set a SIGTERM block */ |
/* Set the signal block */ |
160 |
sigemptyset(&ns); |
sigemptyset(&ns); |
161 |
|
sigaddset(&ns, SIGINT); |
162 |
sigaddset(&ns, SIGTERM); |
sigaddset(&ns, SIGTERM); |
163 |
pthread_sigmask(SIG_BLOCK, &ns, &os); |
pthread_sigmask(SIG_BLOCK, &ns, &os); |
164 |
|
|
206 |
|
|
207 |
reinstall: |
reinstall: |
208 |
|
|
209 |
/* Remove the SIGTERM block */ |
/* Remove the signal block */ |
210 |
pthread_sigmask(SIG_SETMASK, &os, NULL); |
pthread_sigmask(SIG_SETMASK, &os, NULL); |
211 |
|
|
212 |
} |
} |