Skip to content

Commit

Permalink
Create /dev/fd symlink so anonymous pipes can be created
Browse files Browse the repository at this point in the history
In order to support process substitution and anonymous
pipes we need to ensure the /dev/fd path exists.

Change-type: patch
Signed-off-by: Kyle Harding <kyle@balena.io>
  • Loading branch information
klutchell committed Nov 15, 2023
1 parent 3c4c916 commit 91bfde1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions overlay/sbin/init
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ exec 2>/dev/console
chown root:tty /dev/console
chmod 622 /dev/console

# create symlink to /proc/self/fd
ln -s /proc/self/fd /dev/fd

ln -s /proc/self/fd/0 /dev/stdin
ln -s /proc/self/fd/1 /dev/stdout
ln -s /proc/self/fd/2 /dev/stderr
Expand Down

0 comments on commit 91bfde1

Please sign in to comment.