On Sat 06 Mar 2021 17:55, Marius Bakke writes:
> $ ls -l /proc/self/fd
> lrwx-- 1 marius marius 64 Mar 6 17:41 0 -> /dev/pts/18
> lrwx-- 1 marius marius 64 Mar 6 17:41 1 -> /dev/pts/18
> lrwx-- 1 marius marius 64 Mar 6 17:41 2 -> /dev/pts/18
> lr-x-- 1 marius marius 64 Mar 6 1
On Sat, 2021-03-06 at 17:55 +0100, Marius Bakke wrote:
> Hello Guilers,
>
> [...]
>
> It works great, except that the script filename (/tmp/test-shell) has
> an open file descriptor which leaks into the new process:
>
> [...]
>
> I've managed to work around it by setting FD_CLOEXEC on it:
>
>