All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jörg Krause" <joerg.krause@embedded.rocks>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 0/2] Add /dev/std{in, out, err} symlinks to inittabs
Date: Wed,  4 Apr 2018 20:09:33 +0200	[thread overview]
Message-ID: <20180404180935.15185-1-joerg.krause@embedded.rocks> (raw)

Some applications, e.g. bashs process subsitution feature, rely on the
convention of `/dev/fd` being a symbolic link to `/proc/self/fd`.

This symbolic link and his companions `/dev/std*` are created by (e)udev [1],
but not by mdev, resulting in the following error when using the following
expression:
   
```
bash: /dev/fd/62: No such file or directory
```
    
For the sake of simplicity, lets fix this by creating the symlinks in busybox'
and sysvinits inittab file. It is only really needed if eudev isn't used, but
it doesn't really hurt to create them even if eudev will recreate them
afterwards.

Note, that we do not create the symlink `/dev/core` as `/proc/kcore` is
not available on all platforms, e.g. ARM, and the feature is not much
appreciated [2].

[1] https://github.com/gentoo/eudev/blob/8943501993322c59a6eb5be456b0d716aafff21e/src/shared/dev-setup.c#L35-L40
[2] https://lwn.net/Articles/45315/

J?rg Krause (2):
  busybox: add /dev/std{in,out,err} symlinks to inittab
  sysvinit: add /dev/std{in,out,err} symlinks to inittab

 package/busybox/inittab  | 4 ++++
 package/sysvinit/inittab | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

-- 
2.16.3

             reply	other threads:[~2018-04-04 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 18:09 Jörg Krause [this message]
2018-04-04 18:09 ` [Buildroot] [PATCH 1/2] busybox: add /dev/std{in, out, err} symlinks to inittab Jörg Krause
2018-05-01 19:52   ` Peter Korsgaard
2018-06-17 15:58     ` Peter Korsgaard
2018-04-04 18:09 ` [Buildroot] [PATCH 2/2] sysvinit: " Jörg Krause
2018-05-01 19:53   ` Peter Korsgaard
2018-06-17 15:58     ` Peter Korsgaard

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=20180404180935.15185-1-joerg.krause@embedded.rocks \
    --to=joerg.krause@embedded.rocks \
    --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.