Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
aports
aports
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 678
    • Issues 678
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 166
    • Merge Requests 166
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • alpine
  • aportsaports
  • Issues
  • #1465

Closed
Open
Opened Nov 10, 2012 by Oliver Loch@Grimeton

/dev/fd should be symlink (was: BASH: Process substitution fails)

Hi,

on the latest edge version of bash, process substitution fails. If you run:

SNIP 8< =

snow:~# read x y z < <(echo 1 2 3); echo $x
-bash: /dev/fd/62: No such file or directory

snow:~#

>8 = SNAP

you get the above error. It usually works.

I already talked to the guys in #bash on freenode and they think (!) it is uclibc related.

On a GNU libc machine one gets this result:

= >8 = SNIP ===

[root@bomber ~]# read x y z < <(echo 1 2 3); echo $x
1
[root@bomber ~]#

SNAP = 8<

Some additional information:

snow:~# apk info bash
bash-4.2.037-r0 description:
The GNU Bourne Again shell

bash-4.2.037-r0 webpage:
http://www.gnu.org/software/bash/bash.html

bash-4.2.037-r0 installed size:
741376

snow:~#

snow:~# set | grep -E ^BASH
BASH=/bin/bash
BASHOPTS=cmdhist:expand_aliases:extglob:extquote:force_fignore:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_COMPLETION=/etc/bash_completion
BASH_COMPLETION_COMPAT_DIR=/etc/bash_completion.d
BASH_COMPLETION_DIR=/etc/bash_completion.d
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]=“4” [1]=“2” [2]=“37” [3]=“2” [4]=“release” [5]=“x86_64-unknown-linux-gnu”)
BASH_VERSION=‘4.2.37(2)-release’
snow:~#

cu

(from redmine: issue id 1465, created on 2012-11-10, closed on 2012-12-24)

  • Changesets:
    • Revision 20dfee5a by Natanael Copa on 2012-11-19T07:43:25Z:
main/busybox-initscripts: fix /dev/fd symlink

ref #1465

I think the initramfs create /dev/fd as a dir. When mdev-mount later runs
'ln -snf /proc/self/fd /dev/fd' the 'fd' symlink ends up as /dev/fd/fd.

We fix this by always remove /dev/fd before creating the symlink.
  • Revision 5ec48327 by Natanael Copa on 2012-11-19T07:57:27Z:
main/udev: make sure /dev/fd is a symlink to /proc/self/fd

ref #1465
  • Revision 6438be23 by Natanael Copa on 2012-12-21T16:23:26Z:
main/busybox-initscripts: fix /dev/fd symlink

ref #1465

I think the initramfs create /dev/fd as a dir. When mdev-mount later runs
'ln -snf /proc/self/fd /dev/fd' the 'fd' symlink ends up as /dev/fd/fd.

We fix this by always remove /dev/fd before creating the symlink.
(cherry picked from commit 20dfee5aff22b445738a27d737b31121b709d920)
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
Alpine 2.5.1
Milestone
Alpine 2.5.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: alpine/aports#1465