[Lunar-commits] <lunar> Merge pull request #7 from cavalier38/master

Auke Kok sofar+github at foo-projects.org
Mon Jul 9 23:44:04 CEST 2012


commit e25473637c7de4ce10b6313260d4e631c3fb16b8
Author: Auke Kok <sofar+github at foo-projects.org>
Date: Mon, 09 Jul 2012 14:44:04 -0700
URL: https://github.com/lunar-linux/lunar/commit/e25473637c7de4ce10b6313260d4e631c3fb16b8

Merge pull request #7 from cavalier38/master

Prevent stall lin processes
---
  libs/logging.lunar                                           +6/-4     
  1 files changed, 0 insertions (+), 0 deletions (-)

--- a/libs/logging.lunar
+++ b/libs/logging.lunar
@@ -25,6 +25,8 @@ start_logging () {
 
 stop_logging() {
   debug_msg "stop_logging ($@)"
+  # Make sure the FIFO gets closed
+  echo > $C_FIFO
   echo "++ Mark Compile stop   : \"$MODULE\" \"$VERSION\" \"$(date -Ru)\"" >> $C_LOG
   message  "${MESSAGE_COLOR}Creating"                        \
            "${FILE_COLOR}$COMPILE_LOGS/$MODULE-$VERSION.bz2"  \
@@ -88,12 +90,12 @@ activate_voyeur()  {
   debug_msg "activate_voyeur ($@)"
   if [ -z "$SILENT" ] ; then
     case $VOYEUR in
-      on) tee -a $C_LOG < $C_FIFO              & ;;
-      p*) tee -a $C_LOG < $C_FIFO | progress   & ;;
-       *) tee -a $C_LOG < $C_FIFO >/dev/null   & ;;
+      on) ( tee -a $C_LOG < $C_FIFO            ; rm -f "$C_FIFO" ) & ;;
+      p*) ( tee -a $C_LOG < $C_FIFO | progress ; rm -f "$C_FIFO" ) & ;;
+       *) ( tee -a $C_LOG < $C_FIFO >/dev/null ; rm -f "$C_FIFO" ) & ;;
     esac
   else
-    tee -a $C_LOG < $C_FIFO >/dev/null &
+    ( tee -a $C_LOG < $C_FIFO >/dev/null ; rm -f "$C_FIFO" ) &
   fi
 }
 




More information about the Lunar-commits mailing list