[erlang-questions] Stopping a port from within erlang

Claes Wikstrom <>
Wed Aug 29 21:50:33 CEST 2007


Jim Miller wrote:
> 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 


4>  open_port({spawn, "echo $$; sleep 1000"}, []).
#Port<0.105>
5> flush().
Shell got {#Port<0.105>,{data,"3578\n"}}
ok


Pick up the integer and then os:cmd("kill " ++ IntList)


/klacke



More information about the erlang-questions mailing list