diff options
author | Michael K. Johnson <johnsonm@redhat.com> | 1999-09-23 14:54:51 +0000 |
---|---|---|
committer | Michael K. Johnson <johnsonm@redhat.com> | 1999-09-23 14:54:51 +0000 |
commit | 32b3eb094b5546c32d74d84ad181e40b611e1960 (patch) | |
tree | 2bb14fecaba7b8a6b99672022b41aca136c23fcd | |
parent | f2101f99f933cb557b9a402c7649040ae5472508 (diff) | |
download | initscripts-32b3eb094b5546c32d74d84ad181e40b611e1960.tar initscripts-32b3eb094b5546c32d74d84ad181e40b611e1960.tar.gz initscripts-32b3eb094b5546c32d74d84ad181e40b611e1960.tar.bz2 initscripts-32b3eb094b5546c32d74d84ad181e40b611e1960.tar.xz initscripts-32b3eb094b5546c32d74d84ad181e40b611e1960.zip |
be more careful about killing
-rw-r--r-- | src/ppp-watch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ppp-watch.c b/src/ppp-watch.c index dc0454ef..a0d708fc 100644 --- a/src/ppp-watch.c +++ b/src/ppp-watch.c @@ -450,6 +450,7 @@ main(int argc, char **argv) { if (physicalDevice) { free(physicalDevice); physicalDevice = NULL; } physicalDevice = pppLogicalToPhysical(&pppdPid, device); if (physicalDevice) { free(physicalDevice); physicalDevice = NULL; } + if (!pppdPid) cleanExit(34); kill(pppdPid, sendsig); if (sendsig == SIGKILL) { kill(-pppdPid, sendsig); @@ -501,7 +502,7 @@ main(int argc, char **argv) { * hold the modem if we do not get rid of them. * We have kept the old pid/pgrp around in pppdPid. */ - kill(-pppdPid, SIGKILL); + if (pppdPid) kill(-pppdPid, SIGKILL); pppdPid = 0; if (!WIFEXITED(status)) cleanExit(29); |