RE: [LIP] SIGCHLD behaviour...
"Sameer Oak" <[email protected]>
| Newsgroups | gmane.user-groups.linux.india.programmers |
|---|---|
| Message-ID | <[email protected]> |
ok.
-----Original Message-----
From: linux-india-programmers-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:linux-india-programmers-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]On Behalf Of
omanakuttan
Sent: Thursday, April 15, 2004 4:26 PM
To: linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: RE: [LIP] SIGCHLD behaviour...
On Thu, 15 Apr 2004, Sameer Oak wrote:
> ok. but why is it needed to set the action to ignore explicitly?
It is required by POSIX.
>
> > Else, even though the default action is ignore, it will never be
delivered
> > to the process.
> ...
> the default action of SIGCHLD is to ignore, thus that is never delivered
to
> the parent.
>
> the ``else'' and ``even though'' have a bit of irony. kindly explain if
> am getting it wrong.
signalling has two parts : 1. generation and 2. delivery
generation :
1. Default action (ignore)
The siginfo_t table of the destination process is untouched. handler =
SIG_DFL
2. eXPLICITLY setting ignore
The siginfo_t table should add one entry with handler = SIG_IGN.
Ignore is an action.
Delivery :
If the action is to ignore, do_signal() will continue with the next signal.
if handler == SIG_IGN, and signal number is SIGCHLD, kernel willdo
sys_wait4().
if default action (i.e, to ignore), handler is SIG_DFL, there will not be
any sys_wait4(), but the loop will continue with next signal processing.
HTH.
>
> > And init will have to take care fo zonbies and other children.
> ...
> this sounds bit different to me! init becomes parent of all the orphan
> processes and thus clears the zombies
> from process table.
> in what all circumstances does init handle zombies? i've never seen init
> clearing zombies if SIGCHLD is
> ignored by either explicitly setting it to SIG_IGN or not setting it.
> kindly explain.
Sorry, I should have said "If parent dies, init will have3 to clear zonbies"
> -
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
linux-india-programmers mailing list
linux-india-programmers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/linux-india-programmers
*********************************************************
Disclaimer:
This message (including any attachments) contains
confidential information intended for a specific
individual and purpose, and is protected by law.
If you are not the intended recipient, you should
delete this message and are hereby notified that
any disclosure, copying, or distribution of this
message, or the taking of any action based on it,
is strictly prohibited.
*********************************************************
Visit us at http://www.mahindrabt.com
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click