* A question on sigchld_handler
@ 2007-12-27 6:46 Herbert Euler
2007-12-27 9:41 ` Andreas Schwab
0 siblings, 1 reply; 3+ messages in thread
From: Herbert Euler @ 2007-12-27 6:46 UTC (permalink / raw)
To: emacs-devel@gnu.org
Hello,
Here is a question on the SIGCHLD handler, `sigchld_handler' in
process.c.
Could SIGCHLD possibly be delivered more than once to Emacs, so that
`sigchld_handler' is invoked more than once? For example, SIGCHLD
arrives first, hence `sigchld_handler' gets called. Before it
finishes, SIGINT arrives, so `sigchld_handler' is suspended and
`interrupt_signal' gets called. Before `interrupt_signal' finishes,
another SIGCHLD arrives and so `sigchld_handler' gets called again.
Is that possible?
Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: A question on sigchld_handler
2007-12-27 6:46 A question on sigchld_handler Herbert Euler
@ 2007-12-27 9:41 ` Andreas Schwab
2007-12-27 10:10 ` Herbert Euler
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2007-12-27 9:41 UTC (permalink / raw)
To: Herbert Euler; +Cc: emacs-devel@gnu.org
Herbert Euler <herberteuler@hotmail.com> writes:
> Could SIGCHLD possibly be delivered more than once to Emacs, so that
> `sigchld_handler' is invoked more than once?
A signal is blocked as long as its handler hasn't returned. Thus that
can only happen when the signal is explicitly unblocked, or the function
is called manually.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: A question on sigchld_handler
2007-12-27 9:41 ` Andreas Schwab
@ 2007-12-27 10:10 ` Herbert Euler
0 siblings, 0 replies; 3+ messages in thread
From: Herbert Euler @ 2007-12-27 10:10 UTC (permalink / raw)
To: Andreas Schwab; +Cc: emacs-devel@gnu.org
>> Could SIGCHLD possibly be delivered more than once to Emacs, so that
>> `sigchld_handler' is invoked more than once?
>
> A signal is blocked as long as its handler hasn't returned. Thus that
> can only happen when the signal is explicitly unblocked, or the function
> is called manually.
Thank you very much! :D
So I misunderstood the GNU Libc manual.
There are Lisp_Objects used in `sigio_handler', and other structs used
in other signal handlers. These data structures seem not atomic to
signals. How are non-atomic problems avoided here?
Regards,
Guanpeng Xu
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-27 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-27 6:46 A question on sigchld_handler Herbert Euler
2007-12-27 9:41 ` Andreas Schwab
2007-12-27 10:10 ` Herbert Euler
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.