summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/eg/shmkill
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/eg/shmkill')
-rw-r--r--contrib/perl5/eg/shmkill24
1 files changed, 0 insertions, 24 deletions
diff --git a/contrib/perl5/eg/shmkill b/contrib/perl5/eg/shmkill
deleted file mode 100644
index b91ee6f..0000000
--- a/contrib/perl5/eg/shmkill
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/perl
-
-# $RCSfile: shmkill,v $$Revision: 4.1 $$Date: 92/08/07 17:20:45 $
-
-# A script to call from crontab periodically when people are leaving shared
-# memory sitting around unattached.
-
-open(ipcs,'ipcs -m -o|') || die "Can't run ipcs: $!";
-
-while (<ipcs>) {
- $tmp = index($_,'NATTCH');
- $pos = $tmp if $tmp >= 0;
- if (/^m/) {
- ($m,$id,$key,$mode,$owner,$group,$attach) = split;
- if ($attach != substr($_,$pos,6)) {
- die "Different ipcs format--can't parse!\n";
- }
- if ($attach == 0) {
- push(@goners,'-m',$id);
- }
- }
-}
-
-exec 'ipcrm', @goners if $#goners >= 0;
OpenPOWER on IntegriCloud