GNOME Bugzilla – Bug 330960
gnome-pty-helper hangs on gnome-terminal shutdown
Last modified: 2006-04-12 09:50:24 UTC
Here is where it's stuck:
+ Trace 66124
So what happens is when gnome-terminal closes it tells gnome-pty-helper to write logout records then sends the SIGTERM. If gnome-pty-helper is in the middle of writing those records when the signal handler is invoked, you get a hang when libc tries to reenter the utx routines.
Created attachment 59237 [details] [review] Don't do the cleanup from the signal handler Wait until return from the signal handler to clean up and terminate.
Well, believe it or not! I already committed a patch VERY similar to yours on the same date that you reported and attached this patch!!! I never saw your report until tonight! I just did it because I saw a race condition in there when looking at gnome-pty-helper to fix bug #331056. Very very weird... Here is the what I committed: http://cvs.gnome.org/viewcvs/vte/gnome-pty-helper/gnome-pty-helper.c?r1=1.9&r2=1.10 Note that I kept one of the shutdown_helper calls, the one that should exit(1), but you change it and return 0;