summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2002-12-12 04:10:47 +0000
committerbala <balanatarajan@users.noreply.github.com>2002-12-12 04:10:47 +0000
commit59d43ae860577a832d2a4ca16eb729ca4622b500 (patch)
tree9664d8a0fcb72686cd2b3160ac5219d3ac90bd82 /bin
parentbdd24a9d18b78270491b60512570df245bff3e2e (diff)
downloadATCD-59d43ae860577a832d2a4ca16eb729ca4622b500.tar.gz
ChangeLogTag: Wed Dec 11 23:11:09 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/clean_sems.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/clean_sems.sh b/bin/clean_sems.sh
new file mode 100755
index 00000000000..a20f520bc54
--- /dev/null
+++ b/bin/clean_sems.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+if test "$OSTYPE" = "solaris"; then
+ semids=`ipcs | grep $USER | awk '{ print ($2) }'`
+ for p in $semids
+ do ipcrm -s $p
+ done
+else
+ # Linux/GNU
+ ipcs -a | grep $USER | awk '{ print ($2) }' | xargs ipcrm sem;
+fi
+