Re[2]: g_spawn_async_with_pipes and child signals

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thu, 28 Oct 2010 11:02:13 +1100 письмо от Lex Trotman <elextr@xxxxxxxxx>:
> From the traceback below, GIO is using threads to implement
> asynchronism.  Using sigprocmask and therefore signal() is undefined
> in a multi-threaded program but probably defaults to applying to the
> current thread only. Clearly it hasn't blocked the sigint in the
> thread waiting on the pipe IO.  So that thread received the signal and
> executed the default action, terminate the process :-(
> Try blocking sigint very first thing in main(), before any g_* calls,
> then subsequent threads will inherit the signal mask with sigint
> blocked.
Thank you for your answer, Lex.
I put signal(SIGINT, SIG_IGN) as a first instruction in main(), but
SIGINT is still passing to IDE process, and moreover - to display manager
so my X session finishes if I'm not running all this mess under another gdb instance.
Maybe GTK resets handler to SIG_DFL for some reason? 
I didn't get clearly about threads, signal handler is set for a whole process, isn't it?

> GDB sends the signal to its child, ie the process its debugging, but
> signals received by any member go to the whole signal group which by
> default includes GDB itself and your IDE.
Here you gave me a point, I attempted out to move gdb to a new process group after spawning (setpgid(gdb_pid, 0)),
IDE stopped to receive SIGINT, but gdb output was not like any interruption
really took place: "^done\n&Quit\n", no "*stopped" marker,
so probably SIGINT was not sent at all to any process

> Thats the traceback, whats the error message, I'm assuming something
> like sigint received??
Exactly,
Program received signal SIGINT, Interrupt.
0xb7fe2424 in __kernel_vsyscall ()

I want be able to interrupt gdb to be able to insert/delete/modify breakpoints while
debugger is running, by the way I'm trying to do it for geany, I saw your name in geany-devel list,
are you still in business?

Best regards,
Alexander
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list



[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux