On Tue, Jun 01, 2021 at 10:03:50AM +0100, Chavdar Ivanov wrote: > Succeeds for me: > ... > ? ~ gcc -o s s.c > ? ~ ./s > fd = -1 > new_fd = -1
You need to touch foo.txt upfront, that will make the first open work, but the second fail: > ./a.out fd = 3 new_fd = -1 ... so I can reproduce the issue. I am not sure this shold succeed, but it is a gray area (and semantics for procfs are not well defined). Martin