Bug#1108605: hurd: fails to setup console and stdin/out/err
Stéphane Glondu <[email protected]>
| Newsgroups | gmane.linux.debian.ports.hurd |
|---|---|
| Message-ID | <381598a4-35e2-4150-a6ec-adb2360eab47__43604.0236892708$1755942929$gmane$org@debian.org> |
Control: tags -1 + patch Hello, Le 22/08/2025 à 13:25, Samuel Thibault a écrit : >>>> ln: failed to access 'stdin/0': Not a directory >>>> ln: failed to access 'stdout/1': Not a directory >>>> ln: failed to access 'stderr/2': Not a directory >>> >>> This is because >>> >>> cmd ln -f -s fd/0 stdin >>> >>> does not take care of the case when /dev/stdin already exist. This >>> doesn't have any consequence, but could be fixed by checking whether the >>> symlink already exists. >> >> Still not fixed as of Hurd 1:0.9.git20250801-3. > > Sure, it "just" needs somebody to take care of it. > > "could" above doesn't mean that I plan to take the time to fix it. Attached is a patch for this. >> $ ls -al stdin stdout stderr >> lrwxrwxrwx 1 root root 4 2025-05-01 21:11 stderr -> fd/2 >> lrwxrwxrwx 1 root root 4 2025-05-01 21:11 stdin -> fd/0 >> lrwxrwxrwx 1 root root 4 2025-05-01 21:11 stdout -> fd/1 >> >> It really should ship with a script to normalize this as needed. I don't understand what is meant here. Cheers, -- Stéphane
0001-Check-for-existence-of-std-in-out-err-in-MAKEDEV-Clo.patch
(text/x-patch, 888 B)
From 172b6995a0e9b5e74f71e9c538854eece4d0c461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Glondu?= <[email protected]> Date: Sat, 23 Aug 2025 10:42:51 +0100 Subject: [PATCH] Check for existence of std{in,out,err} in MAKEDEV (Closes: #1108605) --- sutils/MAKEDEV.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sutils/MAKEDEV.sh b/sutils/MAKEDEV.sh index 637c156..14530dd 100644 --- a/sutils/MAKEDEV.sh +++ b/sutils/MAKEDEV.sh @@ -149,9 +149,9 @@ mkdev() { st $I root 666 c /hurd/magic tty;; fd) st $I root 666 d /hurd/magic --directory fd - cmd ln -f -s fd/0 stdin - cmd ln -f -s fd/1 stdout - cmd ln -f -s fd/2 stderr + [ -e stdin ] || cmd ln -f -s fd/0 stdin + [ -e stdout ] || cmd ln -f -s fd/1 stdout + [ -e stderr ] || cmd ln -f -s fd/2 stderr ;; 'time') st $I root 644 c /hurd/storeio --no-cache time ;; -- 2.50.1