From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Mehmet Alphan Ulusoy <alphan@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Zombie user tasks
Date: Fri, 28 Nov 2008 17:23:39 +0100 [thread overview]
Message-ID: <49301B0B.9010208@domain.hid> (raw)
In-Reply-To: <20081128181906.mnv2mvjgo44wgoc0@domain.hid>
Mehmet Alphan Ulusoy wrote:
> Thanks for the prompt and informative reply. After reading about
> signals and processes I have to admit that I didn't have a clear idea
> on the concept when I was posting my initial question. Nevertheless
> I've modified the code of the user space task as follows:
>
> - signal handler sets flag when it's called.
>
> - At the end of the initialization routine (main()):
>
> ...
> while(!termFlag)
> pause();
>
> clean();
>
> return;
>
> }
>
>
> ensures that clean() is called only if SIGTERM is received and
> termFlag is raised by the signal handler. (termFlag is an int).
>
> Is this safe?
Yes, this should be Ok.
>
> By the way, in my trials I've found out that ppid of the zombie task
> is 1 (init). So does this mean that the parent of the task did not
> call wait() properly and init is the new parent of the task? Even so,
> shouldn't it be cleaned automatically by init?
It means that the zombie task's parent died before the zombie, so the
zombie got re-parented to init. it will be cleaned automatically by init
after some time.
--
Gilles.
next prev parent reply other threads:[~2008-11-28 16:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-27 15:52 [Xenomai-help] Zombie user tasks Mehmet Alphan Ulusoy
2008-11-27 15:55 ` Gilles Chanteperdrix
2008-11-27 19:39 ` Gilles Chanteperdrix
2008-11-28 16:19 ` Mehmet Alphan Ulusoy
2008-11-28 16:23 ` Gilles Chanteperdrix [this message]
2008-11-28 16:29 ` Mehmet Alphan Ulusoy
2008-11-28 16:40 ` Gilles Chanteperdrix
2008-11-28 17:11 ` Gilles Chanteperdrix
2008-11-28 20:53 ` Alphan Ulusoy
2008-12-21 19:28 ` Alphan Ulusoy
2008-12-21 20:05 ` Alphan Ulusoy
2008-12-21 21:40 ` Alphan Ulusoy
2008-12-22 9:48 ` Gilles Chanteperdrix
2008-12-22 11:32 ` Mehmet Alphan Ulusoy
2008-12-22 13:03 ` Gilles Chanteperdrix
2008-12-23 5:46 ` Alphan Ulusoy
2008-12-23 10:53 ` Gilles Chanteperdrix
2008-12-23 11:46 ` Alphan Ulusoy
2008-12-23 11:50 ` Gilles Chanteperdrix
[not found] ` <9EB4E9E6-B9D4-433C-ABC9-FBBEF29DB0A3@domain.hid>
[not found] ` <4950DB54.3000804@domain.hid>
[not found] ` <C59B6CFD-F977-4130-B8D9-DEB86F055160@domain.hid>
[not found] ` <4950DE5E.6040700@domain.hid>
2008-12-27 13:04 ` Alphan Ulusoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49301B0B.9010208@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=alphan@domain.hid \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.