summaryrefslogtreecommitdiff
path: root/source3/locking
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1997-11-29 13:35:09 +0000
committerAndrew Tridgell <tridge@samba.org>1997-11-29 13:35:09 +0000
commit7da2663f0dbffe5e3c11be9c6c6753720159971e (patch)
treed2c1bfbce1cdeb040db7877442b32b53a458cbda /source3/locking
parentec8e33cde691a6591bcd9846308ba7e6bd1cd882 (diff)
downloadsamba-7da2663f0dbffe5e3c11be9c6c6753720159971e.tar.gz
samba-7da2663f0dbffe5e3c11be9c6c6753720159971e.tar.bz2
samba-7da2663f0dbffe5e3c11be9c6c6753720159971e.zip
don't display locks for dead processes in smbstatus
(This used to be commit c7df484ef6d746fb1f5b53007ee04fa54e5f2223)
Diffstat (limited to 'source3/locking')
-rw-r--r--source3/locking/locking_shm.c8
-rw-r--r--source3/locking/locking_slow.c6
2 files changed, 9 insertions, 5 deletions
diff --git a/source3/locking/locking_shm.c b/source3/locking/locking_shm.c
index 45ab14d452..77ceb2573c 100644
--- a/source3/locking/locking_shm.c
+++ b/source3/locking/locking_shm.c
@@ -619,14 +619,16 @@ static int shm_share_forall(void (*fn)(share_mode_entry *, char *))
while(entry_scanner_p != 0) {
- fn(&entry_scanner_p->e,
- file_scanner_p->file_name);
+ if (process_exists(entry_scanner_p->e.pid)) {
+ fn(&entry_scanner_p->e,
+ file_scanner_p->file_name);
+ count++;
+ }
entry_scanner_p =
(shm_share_mode_entry *)
shmops->offset2addr(
entry_scanner_p->next_share_mode_entry);
- count++;
} /* end while entry_scanner_p */
file_scanner_p = (share_mode_record *)
shmops->offset2addr(file_scanner_p->next_offset);
diff --git a/source3/locking/locking_slow.c b/source3/locking/locking_slow.c
index 9bd6d65aa7..935ed09f60 100644
--- a/source3/locking/locking_slow.c
+++ b/source3/locking/locking_slow.c
@@ -996,8 +996,10 @@ static int slow_share_forall(void (*fn)(share_mode_entry *, char *))
e.pid = SVAL(p,SME_PID_OFFSET);
e.op_type = SVAL(p,SME_OPLOCK_TYPE_OFFSET);
- fn(&e, fname);
- count++;
+ if (process_exists(e.pid)) {
+ fn(&e, fname);
+ count++;
+ }
} /* end for i */
if(buf)