Porcelain simply closes the underlying Erlang port when stop() is called. That works fine with cooperating OS processes but it, unfortunately, cannot terminate OS processes that are supposed to run continuously or that went rogue.
For example, if you spawn `cat` with `in: receive`, calling stop() on it will work fine because `cat` terminates as soon as it sees its input pipe get closed. However, if you spawn `iex`, simply calling stop() won't terminate it.
If you're using the goon driver, you could try Porcelain.Process.signal to send a TERM or KILL signal to the process. With the basic driver nothing can be done to terminate rogue OS processes, short of getting the OS pid and spawning the `kill` utility to get rid of it.
Regarding your second footnote, that's an edge case that I haven't specifically implemented in Porcelain. Are you using the basic driver? I believe you should see some activity when using Porcelain with goon.
Please have a look at this issue
https://github.com/alco/porcelain/issues/13 and see if you can contribute your example to the discussion. I'll try to carve some time to come up with a more robust way to deal with non-cooperating OS processes.
Best,
Alex