Commit 4a8fa205 authored by Monty Montgomery's avatar Monty Montgomery

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.



git-svn-id: https://svn.xiph.org/trunk/postfish@8580 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent a04c7c61
......@@ -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)
......
......@@ -68,17 +68,20 @@ void clean_exit(int sig){
"bug as quickly as possible.\n\n"
"-- monty@xiph.org, Postfish revision %s\n\n",sig,version);
configfile="postfish-staterc-crashsave";
}else{
output_halt_playback();
}
save_state();
save_state();
if(main_looping){
main_looping=0;
gtk_main_quit();
}
exit(0);
if(main_looping){
main_looping=0;
gtk_main_quit();
}
exit(0);
/* otherwise inform the UI thread that we've requested shutdown */
write(eventpipe[1],"\001",1);
}
const char *optstring = "-c:gh";
......
......@@ -1225,7 +1225,15 @@ static gboolean async_event_handle(GIOChannel *channel,
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;
}
......
#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] */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment