[erlang-questions] can a program launched with open_port({spawn, Cmd}, Options) remain running after the port closes?

Tim Watson <>
Thu Sep 27 21:11:10 CEST 2012


On 27 Sep 2012, at 19:18,  wrote:
> Haven't been following this thread closely, but it seems erlexec wasn't
> mentioned yet:
> 
> 	http://code.google.com/p/erlexec/

Doesn't appear very well maintained. I might pick it apart and rewrite it when native processes get released - it is a cool idea. Anyway, for the time being it's not a great help as I'm writing a framework to help set up and tear down clusters for distributed testing (based largely on common test) so I want to minimise the number of dependencies as much as possible. Besides, I'm more interested in working on the remote/ssh runner+monitor next, rather than spending another age fiddling around with the script runner. 

But yes, erlexec does look interesting and has been on my radar since it popped up on this list a few months back, discussing the desire to do proper signal handling (such as sending SIGTERM, SIGHUP, etc to the external program) without resorting to os:cmd("kill -" ++ Code ++ " " ++ OsPid). Again, this is something that linked-in drivers *can* deal with to a limited extent, and therefore I suspect that native processes will make for a very nice foundation on which to build an alternative to open_port/2.    

Also, IIRC there was a cool command line testing framework open sourced in the last year which was announced on this list. I can't remember what it was called, but it has a port driver that handles the the external comms and so on - looked very nice, although that's not what I'm trying to do/be as my focus is on getting things in a consistent state and monitoring to make sure they stay that way through the test run, then tearing down nicely before the next phase kicks off.

Cheers,
Tim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 235 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120927/43026420/attachment.bin>


More information about the erlang-questions mailing list