]> git.ipfire.org Git - thirdparty/glibc.git/commit
hurd: Fix readlink() hanging on fifo
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 14 Sep 2022 16:52:52 +0000 (18:52 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Wed, 14 Sep 2022 16:57:44 +0000 (18:57 +0200)
commit9e5c991106cb04b489272de0ef6a7a6bcef50477
treecf37ad6077a1b419a06c242817f5e53cb08078cd
parent05967faf0e3df6aad07f0b05e138e86f82363deb
hurd: Fix readlink() hanging on fifo

readlink() opens the target with O_READ to be able to read the symlink
content. When the target is actually a fifo, that would hang waiting for a
writer (caught in the coreutils testsuite). We thus have to first lookup the
target without O_READ to perform io_stat and lookout for fifos, and only
after checking the symlink type, we can re-lookup with O_READ.
sysdeps/mach/hurd/readlink.c
sysdeps/mach/hurd/readlinkat.c