Browse code

signal handling in fifo cmd introduced

Jiri Kuthan authored on 27/01/2003 19:42:48
Showing 1 changed files
... ...
@@ -190,6 +190,8 @@ fifo_cmd()
190 190
 	done
191 191
 	CMD="${CMD}\n"
192 192
 
193
+	trap "rm -f $path; exit 1" 2
194
+
193 195
 	# start reader now so that it is ready for replies
194 196
 	# immediately after a request was sent out
195 197
 	cat < $path | filter_fl &
... ...
@@ -534,7 +536,7 @@ case $1 in
534 536
 			echo "error opening read fifo $path"
535 537
 			exit 1
536 538
 		fi
537
-		trap "rm $path; clear; echo sc monitor ^C-ed; exit 1" 2
539
+		trap "rm $path;  clear; echo sc monitor ^C-ed; exit 1" 2
538 540
 		attempt=0
539 541
 		clear
540 542
 		while [ 1 -eq 1 ]; do