[Lunar-commits] CVS: theedge/sbin lin,1.77,1.78

Auke Kok sofar at lunar-linux.org
Sat Apr 17 16:02:57 GMT 2004


Update of /var/cvs/lunar/theedge/sbin
In directory dbguin.lunar-linux.org:/tmp/cvs-serv30294/sbin

Modified Files:
	lin 
Log Message:
Adding a trap that cleans up /tmp/lunar.lin.* and also removes the known temporary files. This works like a charm in cleaning up threads on cancelled or breaking compiles. Hopefully this catches and cleans up on a lot of bad things now.


Index: lin
===================================================================
RCS file: /var/cvs/lunar/theedge/sbin/lin,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- lin	16 Apr 2004 10:15:22 -0000	1.77
+++ lin	17 Apr 2004 16:02:55 -0000	1.78
@@ -205,6 +205,10 @@
 
 GETOPT_ARGS=$(getopt -q -n lin -o "cdf:hprRsvV:" -l "compile,debug,deps,from:,help,probe,reconfigure,resurrect,silent,verbose,Version:" -- "$@")
 
+# the following trap makes sure all threads exit in case something weird
+# happens:
+trap "rm -f $(eval echo \$TEMP_PREPAREDDEPS \$TEMP_DOWNLOADLOG \$INSTALLWATCHFILE) ; exit 1" CHILD INT TERM KILL
+
 if [ -z "$?" ] ; then
   help | view_file
   exit



More information about the Lunar-commits mailing list