[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: Application Ending Before Secondary Thread Ends
From:       Paul Pogonyshev <pogonyshev () gmx ! net>
Date:       2009-11-11 21:32:12
Message-ID: 200911112332.13149.pogonyshev () gmx ! net
[Download RAW message or body]

Marshall Lake wrote:
> I play audio via g_thread.  If the user quits the application before the 
> thread is completed (and the user executes the application from the 
> command line) the terminal needs reseting.  It's fine if the thread ends 
> before the user quits the application.
> 
> I haven't tried but I expect I can avoid this behavior by doing a 
> g_thread_join() and waiting for the thread to finish before exiting the 
> application.  But I don't really want to do that (some of the audio is 
> very long).  Are there any alternatives?

As I understand, the shell waits for the process to exit.  The only
way to achieve what you want is probably spawning another ("real")
process and terminating the current one.  On unixes you could also
fork(), but this is not portable AFAIK.

Paul
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic