From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Auto closing of file descriptors and fork.
Date: Thu, 27 Dec 2007 01:38:30 +0100 [thread overview]
Message-ID: <18290.62470.714603.940223@domain.hid> (raw)
In-Reply-To: <2ff1a98a0712200643u797cfad2ve3848d88feda3bea@domain.hid>
Gilles Chanteperdrix wrote:
> Hi,
>
> I have a problem with auto closing of file descriptors and fork. I
> have an application (a modified pppd, to name it), which in a certain
> mode (pppd "updetach" mode) opens some real-time file descriptors,
> forks and exit the parent, continuing to use the file descriptors in
> the child. The problem is that when exiting the parent, file
> descriptors are automatically destroyed and therefore can not be used
> in the child.
>
> Any ideas for a fix ?
More precisely. We need to trap the "fork" event, and handle it in the
skins event callbacks. We will need to create a new ppd structure for
the new process, but what will we do with the skin objects ? If we keep
the same objects for the child and increment a reference count, we will
end up with an object that need to be inserted in two per-process
lists. If we create new objects, how will we manage for user-space
references (inherited accross fork) to remain valid ?
--
Gilles Chanteperdrix.
next prev parent reply other threads:[~2007-12-27 0:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 14:43 [Xenomai-core] Auto closing of file descriptors and fork Gilles Chanteperdrix
2007-12-20 15:13 ` Daniel Schnell
2007-12-20 15:20 ` Gilles Chanteperdrix
2007-12-27 0:38 ` Gilles Chanteperdrix [this message]
2007-12-27 11:58 ` Jan Kiszka
2007-12-27 13:05 ` Gilles Chanteperdrix
2007-12-27 15:09 ` Jan Kiszka
2007-12-27 15:25 ` Gilles Chanteperdrix
2007-12-27 17:09 ` Jan Kiszka
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=18290.62470.714603.940223@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--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.