If mail sending from emacs fails before it has chance to connect to the smtp-dummy mail server, the opportunistic QUIT message sending makes smtp-dummy to exit. --- Version 2 of the same feature. Now uses BASH's /dev/tcp/host/port feature instead of external 'nc' command. test/test-lib.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 1ea7fa9..749d087 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -395,6 +395,8 @@ emacs_deliver_message () (insert \"${body}\") $@ (message-send-and-exit))" + # opportunistically quit smtp-dummy in case above fails. + { echo QUIT > /dev/tcp/localhost/25025; } 2>/dev/null wait ${smtp_dummy_pid} notmuch new >/dev/null } -- 1.7.7.3