[erlang-questions] Stopping a port from within erlang

Jim Miller <>
Wed Aug 29 20:49:00 CEST 2007

I'm trying to wrap some legacy applications behind a gen_server interface to
allow me to supervise them in an OTP fashion.  I can start the processes
fine with the open_port but I'm looking for a way to stop the spawned
application from within erlang.  At the moment, when I terminate the
gen_server wrapper that spawns the process it leaves the process running,
even after I exit erlang.

Regretably I can't modify the spawned application to listen to a message
from erlang and I'd rather not write another layer to do this.  I'm
currently using the open_port because the only other function os.Cmd isn't
quite what I'm looking for.  Is there something equivalent to exec?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070829/97c6d205/attachment.html>

More information about the erlang-questions mailing list