blob: b4248967d3061c2e38c83363f6e160069006651b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$OpenBSD$
--- plugins/popen.c.orig Wed Apr 12 20:42:46 2006
+++ plugins/popen.c Wed Apr 12 20:42:48 2006
@@ -268,9 +268,10 @@ popen_sigchld_handler (int signo)
RETSIGTYPE
popen_timeout_alarm_handler (int signo)
{
- int fh;
+ int fh = -1;
if (signo == SIGALRM) {
- fh=fileno (child_process);
+ if (child_process)
+ fh=fileno (child_process);
if(fh >= 0){
kill (childpid[fh], SIGKILL);
}
|