summaryrefslogtreecommitdiffstats
path: root/source3/locking/locking_shm.c
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/locking_shm.c
parentec8e33cde691a6591bcd9846308ba7e6bd1cd882 (diff)
downloadsamba-7da2663f0dbffe5e3c11be9c6c6753720159971e.tar.gz
samba-7da2663f0dbffe5e3c11be9c6c6753720159971e.tar.xz
samba-7da2663f0dbffe5e3c11be9c6c6753720159971e.zip
don't display locks for dead processes in smbstatus
(This used to be commit c7df484ef6d746fb1f5b53007ee04fa54e5f2223)
Diffstat (limited to 'source3/locking/locking_shm.c')
-rw-r--r--source3/locking/locking_shm.c8
1 files changed, 5 insertions, 3 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);