bug-bash
[Top][All Lists]
Advanced

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

bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution


From: Yuri
Subject: bash leaks sh-np-NNN files and pipes in /tmp/ when command substitution is used
Date: Tue, 10 Dec 2013 23:29:37 -0800
User-agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Some of my scripts use command substitution, and now I see that there are lots of files like these in /tmp:
prw-------   1 yuri   wheel          0 Dec 10 13:32 sh-np-1386738492
-rw-r--r--   1 yuri   wheel    3278909 Dec 10 14:54 sh-np-1386721176

Besides the obvious question why they aren't deleted in the end, two questions: Shouldn't bash delete the pipe files once the child process opened them? On most platforms the deleted pipe will function the same with the benefit that it will get deleted automatically. Why some of he files /tmp/sh-np-NNN are regular files, not pipes? When I look through code I see mkfifo call creates them. Shouldn't it always create fifos and not files?

bash-4.2.45
FreeBSD-9.2

Yuri



reply via email to

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