# HG changeset patch # User Franz Glasner # Date 1571177307 -7200 # Node ID 61df67459e30235e7fd54bf9f7958f7d28d6fe78 # Parent 5366fb3b222ce62a411d96f0a4ffeeeebca30a5b Comment diff -r 5366fb3b222c -r 61df67459e30 bin/bsmtp2dma --- a/bin/bsmtp2dma Wed Oct 16 00:03:08 2019 +0200 +++ b/bin/bsmtp2dma Wed Oct 16 00:08:27 2019 +0200 @@ -169,6 +169,10 @@ return ${_rc} fi + # + # Start the mailer **before** opening the pipe; otherwise a + # deadlock occurs + # "$MAILER" -f "${_sender_addr}" "${_recipient_addr}" <${MAILFIFO_STDIN} >${MAILFIFO_STDOUT} & _pid_mailer=$! @@ -211,7 +215,7 @@ # printf ".\n" >&3 IFS="$_oifs" - # close the fd to the pipe: coproc should get EOF + # close the fd to the pipe: coproc should get EOF and terminate exec 3>&- # read eventually remaining stuff from the mailer until EOF IFS='' read _dummy <&4