All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lowell Gilbert <kludge@be-well.ilk.org>
To: Philippe Gerum via Xenomai <xenomai@xenomai.org>
Subject: Re: having problems with daemonizing
Date: Mon, 29 Apr 2019 11:05:29 -0400	[thread overview]
Message-ID: <445zqwg8cm.fsf@be-well.ilk.org> (raw)
In-Reply-To: <e0ff187c-8247-e7ed-0ee4-b9a195a393b6@xenomai.org> (Philippe Gerum via Xenomai's message of "Sun, 28 Apr 2019 17:26:39 +0200")

Philippe Gerum via Xenomai <xenomai@xenomai.org> writes:

> On 4/27/19 12:20 AM, Steve Freyder wrote:
>> I think deamonizing in its canonical form of: fork(), let the forked
>> process take over, and then exit() in the parent, is problematic when
>> you have a wrapped main() where the wrappers already initialized the
>> sysreg mechanism but the process that was done for is now gone, and
>> the fork()'ed process has no idea it has a sysreg socket in hand.
>> 
>> Perhaps the better answer when daemonizing is to use --no-init and then
>> have the forked() process do manual xenomai_init() call?

I think that's reasonable. With the caveat that it turns xenomai_init()
into an API function.

> I don't know yet, I'll follow up on this.


  reply	other threads:[~2019-04-29 15:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26 21:18 having problems with daemonizing Lowell Gilbert
2019-04-26 22:20 ` Steve Freyder
2019-04-28 15:26   ` Philippe Gerum
2019-04-29 15:05     ` Lowell Gilbert [this message]
2019-05-03 11:12     ` Philippe Gerum
2019-05-03 14:26       ` Lowell Gilbert
2019-05-03 15:10         ` Philippe Gerum
2019-04-29  7:12   ` Julien Blanc
2019-04-29 12:35 ` Lange Norbert

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=445zqwg8cm.fsf@be-well.ilk.org \
    --to=kludge@be-well.ilk.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.