diff options
author | joerg <joerg@FreeBSD.org> | 1996-04-04 23:06:22 +0800 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1996-04-04 23:06:22 +0800 |
commit | 471740debe58ce479edff5c864bf98ad0a6df448 (patch) | |
tree | 3db829c645e0b306fccd329859a80cd6552af48c /comms/seyon | |
parent | 473cc8573b6a852317b96e3b0d544825db349301 (diff) | |
download | freebsd-ports-gnome-471740debe58ce479edff5c864bf98ad0a6df448.tar.gz freebsd-ports-gnome-471740debe58ce479edff5c864bf98ad0a6df448.tar.zst freebsd-ports-gnome-471740debe58ce479edff5c864bf98ad0a6df448.zip |
Properly examine the validity of UUCP lock files. This was totally
broken, the locks were always clobbered.
Diffstat (limited to 'comms/seyon')
-rw-r--r-- | comms/seyon/files/patch-ab | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/comms/seyon/files/patch-ab b/comms/seyon/files/patch-ab new file mode 100644 index 000000000000..de3b4439b562 --- /dev/null +++ b/comms/seyon/files/patch-ab @@ -0,0 +1,29 @@ +--- SePort.c.orig Thu Apr 4 11:44:26 1996 ++++ SePort.c Thu Apr 4 11:51:54 1996 +@@ -1011,6 +1011,7 @@ + pid_t pid, + lckpid; + char *modemname; ++ int killret; + #if LF_USE_ASCII_PID + char pidstr[20], + lckpidstr[20]; +@@ -1077,11 +1078,13 @@ + #endif + + lockPid = (pid_t) lckpid; +- if (kill(lckpid, 0) == 0) { +- SeErrorF("Device %s is locked by process %d", modem_port, lckpid, ""); +- unlink(ltmp); +- return -1; +- } ++ killret = kill(lockPid, 0); ++ if(killret == 0 || (killret == -1 && errno != ESRCH)) { ++ SeErrorF("Device %s is locked by process %d.", ++ modem_port, lckpid, ""); ++ unlink(ltmp); ++ return -1; ++ } + } + } + |