perlport 1.30
[p5sagit/p5-mst-13.2.git] / eg / shmkill
index ba288d8..b91ee6f 100644 (file)
@@ -1,11 +1,11 @@
 #!/usr/bin/perl
 
-# $Header: shmkill,v 2.0 88/06/05 00:16:59 root Exp $
+# $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";
+open(ipcs,'ipcs -m -o|') || die "Can't run ipcs: $!";
 
 while (<ipcs>) {
     $tmp = index($_,'NATTCH');
@@ -13,7 +13,7 @@ while (<ipcs>) {
     if (/^m/) {
        ($m,$id,$key,$mode,$owner,$group,$attach) = split;
        if ($attach != substr($_,$pos,6)) {
-           die "Different ipcs format--can't parse!";
+           die "Different ipcs format--can't parse!\n";
        }
        if ($attach == 0) {
            push(@goners,'-m',$id);