mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
package.sh: clean up FIFO properly (re: 936802f9
)
Not cleaning up the FIFO broke 'grep -r' in the arch directory, making it hang forever. So we need a better way of cleaning it up. bin/package, src/cmd/INIT/package.sh: - Unlink the FIFO early after sleeping a second in the background. This works because the named directory entry is only needed to establish the pipe, not to keep it going.
This commit is contained in:
parent
8d8a825723
commit
3e14072768
2 changed files with 10 additions and 0 deletions
|
@ -3973,6 +3973,11 @@ capture() # file command ...
|
|||
# the main shell environment and its exit status can be used for $error_status
|
||||
rm -f $o.fifo
|
||||
mkfifo -m 600 $o.fifo || exit
|
||||
(
|
||||
sleep 1
|
||||
# unlink early
|
||||
exec rm $o.fifo
|
||||
) &
|
||||
$TEE -a $o < $o.fifo &
|
||||
{
|
||||
case $s in
|
||||
|
|
|
@ -3972,6 +3972,11 @@ capture() # file command ...
|
|||
# the main shell environment and its exit status can be used for $error_status
|
||||
rm -f $o.fifo
|
||||
mkfifo -m 600 $o.fifo || exit
|
||||
(
|
||||
sleep 1
|
||||
# unlink early
|
||||
exec rm $o.fifo
|
||||
) &
|
||||
$TEE -a $o < $o.fifo &
|
||||
{
|
||||
case $s in
|
||||
|
|
Loading…
Reference in a new issue