Sorry Pädu but this smells for many reasons.. first:<p><pre><code> The dns-sd command is primarily intended for interactive use. Because
its command-line arguments and output format are subject to change,
invoking it from a shell script will generally be fragile. Additionally,
the asynchronous nature of DNS Service Discovery does not lend itself
easily to script-oriented programming. For example, calls like "browse"
never complete;
</code></pre>
Second, "SIGKILL is too verbose, SIGINT is too soft".. how about SIGTERM? Its very likely that you're doing it wrong if you need to use -KILL in your scripts.<p>Third, "[1] 58181 killed ./discover-vnc.sh --- It's crucial to suppress this line." again, if you think you must suppress this, you're doing it wrong. This shouldn't pop up in the first place.<p>Fourth, what about fifos and `$!'?<p>Fifth, why bash? Use the sh-subset.<p>etc.<p>It's cute that you managed to solve your problem but this is nothing more than an unreliable hack, pompously presented ("Taming non-terminating Bash processes", "Kill the children"..)