All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] Starting programs in the background at init time: stdin EOF problem
Date: Mon, 11 Apr 2011 11:53:15 +0200	[thread overview]
Message-ID: <BANLkTimN8OJvrnFvW=BeLrCsuTB6-7ZxDw@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=qUjcrhX92_WCRXyaCSNxwscDtPA@mail.gmail.com>

Hej Daniel!

2011/4/11 Daniel Nystr?m <daniel.nystrom@timeterminal.se>:
> Hi Thomas!
>
> 2011/4/11 Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>:
>> What is the recommended way to start programs in such an embedded
>> environment?
>
> I'm using start-stop-daemon to perform similar tasks. Have you given
> it a try? It can "daemonize" even non-daemons which is pretty nice for
> e.g. GUI softwares.
>

Thanks for the hint.
I just gave it a try as follows:
# start-stop-daemon  -S -x ./shell  --background

Unfortunately, it seems to have the same problem. By daemonizing, the
file descriptor stdin seems to be closed, so my test program loops
forever (which I was able to visualize with strace).

I may need to adapt my program to not use stdio, but rather other
filedescriptors. I suppose that they will not be impacted be
foreground/background issues?



Where do you start start-stop-daemon from? Directly from inittab or
from scripts in /etc/init.d?
How do you start other programs automatically?

Thanks,
Thomas

  reply	other threads:[~2011-04-11  9:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-11  7:58 [Buildroot] Starting programs in the background at init time: stdin EOF problem Thomas De Schampheleire
2011-04-11  8:55 ` Daniel Nyström
2011-04-11  9:53   ` Thomas De Schampheleire [this message]
2011-04-11 10:25     ` Daniel Nyström
2011-04-14  7:29       ` Thomas De Schampheleire

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='BANLkTimN8OJvrnFvW=BeLrCsuTB6-7ZxDw@mail.gmail.com' \
    --to=patrickdepinguin+buildroot@gmail.com \
    --cc=buildroot@busybox.net \
    /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.