summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog13
-rwxr-xr-xbin/clean_sems.sh22
2 files changed, 24 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index ffe15839115..f7683586ddf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Thu Jun 5 07:05:42 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/clean_sems.sh:
+
+ Update this script to work with IRIX, Tru64 and HP-UX and possibly
+ others.
+
Thu Jun 5 03:45:46 UTC 2003 Don Hinton <dhinton@dresystems.com>
* include/makeinclude/wrapper_macros.GNU:
@@ -25,12 +32,12 @@ Wed Jun 4 19:42:33 UTC 2003 Don Hinton <dhinton@dresystems.com>
Wed Jun 4 13:47:45 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
- * THANKS: Added Jason Cohen to the hall of fame.
+ * THANKS: Added Jason Cohen to the hall of fame.
Wed Jun 4 12:43:41 2003 Balachandran Natarajan <bala@dre.vanderbilt.edu>
- * ace/CDR_Stream.cpp: Removed a duplicate semicolon. Thanks to Rob
- Andzik <andzik@rtlogic.com> for catching this.
+ * ace/CDR_Stream.cpp: Removed a duplicate semicolon. Thanks to Rob
+ Andzik <andzik@rtlogic.com> for catching this.
Wed Jun 4 10:30:35 2003 Chad Elliott <elliott_c@ociweb.com>
diff --git a/bin/clean_sems.sh b/bin/clean_sems.sh
index a20f520bc54..57fbf3e9c06 100755
--- a/bin/clean_sems.sh
+++ b/bin/clean_sems.sh
@@ -1,12 +1,18 @@
#!/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;
+if [ -z "$USER" ]; then
+ USER=`id | sed 's/).*//; s/.*(//'`
fi
+SYSTEM=`uname -s`
+case "$SYSTEM" in
+ "Linux" )
+ ipcs -a | grep $USER | awk '{ print ($2) }' | xargs ipcrm sem;
+ ;;
+ * )
+ semids=`ipcs | grep "^s" | grep $USER | awk '{ print ($2) }'`
+ for p in $semids
+ do ipcrm -s $p
+ done
+ ;;
+esac