]> git.notmuchmail.org Git - notmuch/commit
test/smtp-dummy: add --background option and functionality
authorTomi Ollila <too@iki.fi>
Tue, 18 Sep 2012 14:23:01 +0000 (17:23 +0300)
committerDavid Bremner <bremner@debian.org>
Sat, 20 Oct 2012 20:45:52 +0000 (17:45 -0300)
commitd894887c94c67860af817239bb1ce3b0360ec3e0
tree96bb8798a9eda4d6234872747b9f61fed8bf9cd8
parent1a4aa694921cbc79014141523c8afbfecb5076c9
test/smtp-dummy: add --background option and functionality

When shell executes background process using '&' the scheduling of
that new process is arbitrary. It could be that smtp-dummy doesn't
get execution time to listen() it's server socket until some other
process attempts to connect() to it. The --background option in
smtp-dummy makes it to go background *after* it started to listen
its server socket.

When --background option is used, the line "smtp_dummy_pid='<pid>'"
is printed to stdout from where shell can eval it.
test/smtp-dummy.c