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: Thu, 27 Nov 2008 16:55:40 +0100 [thread overview]
Message-ID: <492EC2FC.5030808@domain.hid> (raw)
In-Reply-To: <20081127175234.163sujmgcgcgs4gk@domain.hid>
Mehmet Alphan Ulusoy wrote:
> I have a problem where when I want to terminate a xenomai user space
> task, the task becomes a zombie and I can not re-run it since some of
> the resources (like mutexes) it uses are already there and can't be
> created again.
>
> The scenario is as follows:
>
> - A process running on the computer forks to create a child.
> - The child executes the user space task using the system() call.
> (child does not return). I suppose userTask is the child of the child
> process now.
> - After a while it attempts to terminate the task by calling "pkill
> -SIGTERM userTask" using the system() call again.
> - The task, not always but sooner or later -above steps are repeated
> for a number of times-, becomes a zombie.
> - The user space task has a signal handler for SIGTERM and SIGINT signals.
> - The signal handler is as follows:
You need to handle SIGCHLD in the father.
See http://en.wikipedia.org/wiki/Zombie_process
--
Gilles.
next prev parent reply other threads:[~2008-11-27 15:55 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 [this message]
2008-11-27 19:39 ` Gilles Chanteperdrix
2008-11-28 16:19 ` Mehmet Alphan Ulusoy
2008-11-28 16:23 ` Gilles Chanteperdrix
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=492EC2FC.5030808@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.