]> git.notmuchmail.org Git - notmuch/commit
test/test-lib.sh: take the --background feature in smtp-dummy into use
authorTomi Ollila <too@iki.fi>
Tue, 18 Sep 2012 14:23:02 +0000 (17:23 +0300)
committerDavid Bremner <bremner@debian.org>
Sat, 20 Oct 2012 20:46:11 +0000 (17:46 -0300)
commitb7f7b573e4bf3d00d9e887bc1aee264722d22778
treeebdfac5435ea3b0f4e8fd52fc203d51062cb3607
parentd894887c94c67860af817239bb1ce3b0360ec3e0
test/test-lib.sh: take the --background feature in smtp-dummy into use

The use of --background option (instead of shell '&') ensures that
smtp-dummy is listening its server socket until execution of shell
script can continue, thus the client will always have socket where
to connect.

smtp-dummy outputs smtp_dummy_pid variable in shell assignment format;
eval'ing that output makes that variable available for the shell.

As the smtp-dummy instance is no longer child process of the script
the SIGKILL signal sent to it will ensure it is going away in case
the mail sender fails to connect to smtp-dummy.
test/test-lib.sh