Thanks man, your feedback is appreciated. I'm well aware of the dirty nature of this solution[1] but it seems to be the only way to achieve this within context (OS X, Alfred).
[1] https://github.com/pstadler/non-terminating-bash-processes#c...
Edit: $! is not working with the distributed Bash version (currently 3.2) on OS X. Unfortunately, dns-sd is the only utility to discover network services on OS X. There are many projects which use the same hack involving dns-sd.
I invite you to find a better solution to this problem.