summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmodules/wall5
-rwxr-xr-xnoise11
2 files changed, 9 insertions, 7 deletions
diff --git a/modules/wall b/modules/wall
index fa7618fe..7c32d01d 100755
--- a/modules/wall
+++ b/modules/wall
@@ -2,8 +2,7 @@
case "$1" in
(--help) : ;;
(?*)
- for client in /tmp/noise-client-* ; do
- #echo /msg "$*`printf '\a'`" >$client
- echo /msg "$*" >$client
+ for linefeed in /tmp/noise/*/linefeed ; do
+ echo /msg "$*" >$linefeed
done
esac
diff --git a/noise b/noise
index 0e60bbf2..2b63acbe 100755
--- a/noise
+++ b/noise
@@ -50,8 +50,10 @@ fail() {
}
cleanup() {
- rm -f $linefeed $env
kill $jobs
+ rm -f $linefeed $env
+ rmdir /tmp/noise/$$ 2>/dev/null
+ rmdir /tmp/noise 2>/dev/null
}
@@ -62,8 +64,9 @@ if test -d "$dirname/modules" ; then
export NOISE_PATH="${NOISE_PATH+$NOISE_PATH:}$dirname/modules"
export NOISE_PATH="${NOISE_PATH+$NOISE_PATH:}$HOME/noise/modules"
fi
-linefeed="/tmp/noise-client-$$"
-env="/tmp/noise-client-$$-env"
+mkdir -vp /tmp/noise/$$
+linefeed="/tmp/noise/$$/linefeed"
+env="/tmp/noise/$$/environment"
trap cleanup EXIT
mkfifo $linefeed
touch $env
@@ -89,7 +92,7 @@ while echo -n "$noise_prompt" && eval "`readline`" ; do
module="$dir/$command"
if test -x "$module" ; then
shift
- eval 'NOISE="$0" NOISE_linefeed="$linefeed" "$module"' "$args"
+ eval 'NOISE="$0" NOISE_pid="$$" NOISE_linefeed="$linefeed" "$module"' "$args"
continue 2
fi
done