Hi! I’m still getting zombie processes with erlexec and nothing that I do seems to be able to resolve this. Firstly, i’m on linux. Secondly, i can’t use muontrap, since I need to stream input and output into the other process.
Control-c/a definitely creates a zombie (I think the GenServer doesn’t even get the stop message), and even System.stop(0) creates a zombie.
I’m free to put anything in the top of the forever script, so if I can use that to, maybe set the process group or a job, I can definitely do that, but I’m not familiar enough with linux to know if that makes sense. thanks
There is no clean way to do it without using middleware if you are consuming stdin. You need another OS process which act like monitor and do the cleanup. mountrap & ExCmd are such middlewere, but mountrap does not support communicating with the external process and ex_cmd does.
Also If you are streaming a lot of data in/out of beam then it can lead to memory issue. ex_cmd also solves that. See memory issue mentioned here