andruby/mailcatcher — pull request #3 by mlafeldt (2013-11-03 09:41:12+00:00)
Title: Start mailcatcher in foreground so that upstart can track it

This fixes the problem that mailcatcher cannot be stopped/restarted and allows us to use upstart as it is supposed to be used:

```
root@practicingruby:/etc/init# start mailcatcher
mailcatcher start/running, process 30504
root@practicingruby:/etc/init# status mailcatcher
mailcatcher start/running, process 30504
root@practicingruby:/etc/init# stop mailcatcher
mailcatcher stop/waiting
root@practicingruby:/etc/init# status mailcatcher
mailcatcher stop/waiting
root@practicingruby:/etc/init# start mailcatcher
mailcatcher start/running, process 30515
root@practicingruby:/etc/init# restart mailcatcher
mailcatcher start/running, process 30522
root@practicingruby:/etc/init# restart mailcatcher
mailcatcher start/running, process 30529
```

Note: I've tried both `expect fork` and `expect daemon` to no avail. They only work if the fork count is 1 or 2, but Event Machine seems to spawn way more processes that upstart cannot track. The `--foreground` mode works around this.