reverted open_pipe's previous temp directory behavior (mkfifo can't overwrite empty file)
This commit is contained in:
parent
a64ae8f0f4
commit
cd007a6716
8
qq2clone
8
qq2clone
|
@ -61,11 +61,11 @@ open_pipe ()
|
||||||
{
|
{
|
||||||
check_pipe && return
|
check_pipe && return
|
||||||
local fifo_path
|
local fifo_path
|
||||||
fifo_path=$(mktemp) || temp_error
|
fifo_path=$(mktemp -d) || temp_error
|
||||||
#shellcheck disable=2064
|
#shellcheck disable=2064
|
||||||
trap "exec 3>&-; exec 3<&-;rm -f $fifo_path" EXIT
|
trap "exec 3>&-; exec 3<&-;rm -rf $fifo_path" EXIT
|
||||||
mkfifo "$fifo_path" || fifo_error
|
mkfifo "$fifo_path/fifo" || fifo_error
|
||||||
exec 3<>"$fifo_path"
|
exec 3<>"$fifo_path/fifo"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
#=========================================================================#
|
#=========================================================================#
|
||||||
|
|
Loading…
Reference in New Issue