[xiph-commits] r8580 - trunk/postfish

xiphmont at motherfish-iii.xiph.org xiphmont at motherfish-iii.xiph.org
Sun Jan 2 18:25:52 PST 2005


Author: xiphmont
Date: 2005-01-02 18:25:51 -0800 (Sun, 02 Jan 2005)
New Revision: 8580

Modified:
   trunk/postfish/Makefile
   trunk/postfish/main.c
   trunk/postfish/mainpanel.c
   trunk/postfish/version.h
Log:
Correct a signal bug: sigint during playback often cuased a deadlock.
Handle this situation properly by having the sigint handler submit a
termination request via the event queue for the UI thread to handle in
proper order.



Modified: trunk/postfish/Makefile
===================================================================
--- trunk/postfish/Makefile	2005-01-02 20:23:41 UTC (rev 8579)
+++ trunk/postfish/Makefile	2005-01-03 02:25:51 UTC (rev 8580)
@@ -6,11 +6,11 @@
 # Use the below line to build for PowerPC
 # The PPC build *must* use -maltivec, even if the target is a non-altivec machine
 
-ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1 -maltivec -mcpu=7400
+#ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1 -maltivec -mcpu=7400
 
 # use the below for x86 and most other platforms where 'float' is 32 bit IEEE754
 
-#ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1 
+ADD_DEF= -DUGLY_IEEE754_FLOAT32_HACK=1 
 
 # use the below for anything without IEE754 floats (eg, VAX)
 

Modified: trunk/postfish/main.c
===================================================================
--- trunk/postfish/main.c	2005-01-02 20:23:41 UTC (rev 8579)
+++ trunk/postfish/main.c	2005-01-03 02:25:51 UTC (rev 8580)
@@ -68,17 +68,20 @@
 	    "bug as quickly as possible.\n\n"
 	    "-- monty at xiph.org, Postfish revision %s\n\n",sig,version);
     configfile="postfish-staterc-crashsave";
-  }else{
-    output_halt_playback();
+
+    save_state();
+    
+    if(main_looping){
+      main_looping=0;
+      gtk_main_quit();
+    }
+    exit(0);
+
   }
 
-  save_state();
+  /* otherwise inform the UI thread that we've requested shutdown */
+  write(eventpipe[1],"\001",1);
 
-  if(main_looping){
-    main_looping=0;
-    gtk_main_quit();
-  }
-  exit(0);
 }
 
 const char *optstring = "-c:gh";

Modified: trunk/postfish/mainpanel.c
===================================================================
--- trunk/postfish/mainpanel.c	2005-01-02 20:23:41 UTC (rev 8579)
+++ trunk/postfish/mainpanel.c	2005-01-03 02:25:51 UTC (rev 8580)
@@ -1225,7 +1225,15 @@
   char buf[1];
   read(eventpipe[0],buf,1);
 
-  feedback_process(panel);
+  switch(buf[0]){
+  case 0:
+    feedback_process(panel);
+    break;
+  case 1:
+    shutdown();
+    break;
+  }
+  
   return TRUE;
 }
 

Modified: trunk/postfish/version.h
===================================================================
--- trunk/postfish/version.h	2005-01-02 20:23:41 UTC (rev 8579)
+++ trunk/postfish/version.h	2005-01-03 02:25:51 UTC (rev 8580)
@@ -1,2 +1,2 @@
 #define VERSION "$Id$ "
-/* DO NOT EDIT: Automated versioning hack [Sun Jan  2 15:25:34 EST 2005] */
+/* DO NOT EDIT: Automated versioning hack [Sun Jan  2 21:30:12 EST 2005] */



More information about the commits mailing list