bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sr #108732: named pipe leaks for systems not support DEV_FD


From: Eduardo A . Bustamante López
Subject: sr #108732: named pipe leaks for systems not support DEV_FD
Date: Wed, 25 Mar 2015 04:15:45 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

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

[Prev in Thread] Current Thread [Next in Thread]