Revision 885660bd
b/net/tap.c | ||
---|---|---|
346 | 346 |
|
347 | 347 |
static int launch_script(const char *setup_script, const char *ifname, int fd) |
348 | 348 |
{ |
349 |
sigset_t oldmask, mask; |
|
350 | 349 |
int pid, status; |
351 | 350 |
char *args[3]; |
352 | 351 |
char **parg; |
353 | 352 |
|
354 |
sigemptyset(&mask); |
|
355 |
sigaddset(&mask, SIGCHLD); |
|
356 |
sigprocmask(SIG_BLOCK, &mask, &oldmask); |
|
357 |
|
|
358 | 353 |
/* try to launch network script */ |
359 | 354 |
pid = fork(); |
360 | 355 |
if (pid == 0) { |
... | ... | |
378 | 373 |
while (waitpid(pid, &status, 0) != pid) { |
379 | 374 |
/* loop */ |
380 | 375 |
} |
381 |
sigprocmask(SIG_SETMASK, &oldmask, NULL); |
|
382 | 376 |
|
383 | 377 |
if (WIFEXITED(status) && WEXITSTATUS(status) == 0) { |
384 | 378 |
return 0; |
Also available in: Unified diff