Original report here: https://savannah.gnu.org/support/index.php?108732

On systems without /dev/fd support, using procsub will generate a temporary
file.

In the case of bash -c 'cat <(echo yes)', the no-fork optimization will cause
this to not clean up the created temporary file.

Reproduced against latest devel branch:

dualbus@yaqui ...src/gnu/bash % strace -fo x -e open ./bash -c 'cat <(echo ok)'
ok
dualbus@yaqui ...src/gnu/bash % grep sh- x                                     
25673 open("/tmp/sh-np-1050257607", O_WRONLY <unfinished ...>
25672 open("/tmp/sh-np-1050257607", O_RDONLY <unfinished ...>
dualbus@yaqui ...src/gnu/bash % ls -l /tmp/sh-np-1050257607                    
prw------- 1 dualbus dualbus 0 Mar 25 04:11 /tmp/sh-np-1050257607
dualbus@yaqui ...src/gnu/bash % rm -f /tmp/sh-np-1050257607  

I forced the removal of /dev/fd support with:

dualbus@yaqui ...src/gnu/bash % grep undef config.h|grep DEV_FD
#undef HAVE_DEV_FD
#undef DEV_FD_PREFIX

-- 
Eduardo Bustamante | https://dualbus.me/

Reply via email to