summaryrefslogtreecommitdiff
path: root/setup/Linux/oss/scripts/showprocs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'setup/Linux/oss/scripts/showprocs.sh')
-rwxr-xr-xsetup/Linux/oss/scripts/showprocs.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/setup/Linux/oss/scripts/showprocs.sh b/setup/Linux/oss/scripts/showprocs.sh
new file mode 100755
index 0000000..827bb33
--- /dev/null
+++ b/setup/Linux/oss/scripts/showprocs.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+PROCS="`fuser /dev/mixer* /dev/dsp* /dev/audio* /dev/sequencer /dev/music /dev/midi*|sed 's/.* //'|sort|uniq`"
+
+if test "$PROCS " = " "
+then
+ exit 0
+fi
+
+if test "$1 " != "-q "
+then
+echo $PROCS
+echo
+echo "NOTICE!"
+echo "======="
+echo
+echo There are some programs still using OSS devices. You may need to stop them
+echo manually:
+echo
+fi
+
+for pid in $PROCS
+do
+ ps ax|grep "^ *$pid "
+done
+
+echo
+
+exit 0