gtk_timeout_add() and EINTR from the poll()



After a laptop suspend, the poll from a gtk_timeout_add() is
returning EINTR and then the app is terminated with SIGTERM.
I'm wondering where the SIGTERM comes from.  Does Gtk do that
or does Gtk usually re-issue the poll and the SIGTERM is coming
from somewhere else?

The strace output from normal free running:
...
gettimeofday({1053341852, 951610}, NULL) = 0
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN}], 3, 8
4) = 0
gettimeofday({1053341853, 51931}, NULL) = 0
time([1053341853])                      = 1053341853
...

where the "time()" call is the first system call the app
makes in the timeout callback.  The time() function is not
called after the suspend, and that strace output is:

gettimeofday({1053341853, 61701}, NULL) = 0
poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}, {fd=8, events=POLLIN}], 3, 8
5) = -1 EINTR (Interrupted system call)
--- SIGTERM (Terminated) @ 0 (0) ---
...
munmap(0x40022000, 4096)                = 0
exit_group(1)                           = ?

Thanks,

Bill



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