[erlang-questions] open_port and port_close semantics

Michael McDaniel <>
Thu Apr 30 17:08:18 CEST 2009


 a couple old threads on the subject


http://www.erlang.org/pipermail/erlang-questions/2001-July/003429.html
http://erlang.org/pipermail/erlang-questions/2007-August/028743.html


~M


On Thu, Apr 30, 2009 at 08:53:22AM -0500, Dave Bryson wrote:
> 
> I'm pretty sure 'port_close' sends an exit signal to the child process  
> (have not confirmed from src) .  At least in my application it kills  
> the child process.  However in most cases I'll send my own stop  
> message to the child process and have it call exit on itself so it can  
> do any clean-up necessary.
> 
> Dave
> 
> On Apr 30, 2009, at 5:50 AM, Camille Troillard wrote:
> 
> > Hello,
> >
> > I am trying to understand the semantics of open_port and port_close.
> > I was expecting port_close to send a quit signal to the child  
> > process, but it merely close the file handlers from what I've read  
> > in the doc and trapexit forums.
> >
> > What is the reason behind this?
> > How do you make sure there are no leftover processes when the  
> > application shuts down?
> >
> >
> > Thanks!
> > Cam
> >
> > _______________________________________________
> > erlang-questions mailing list
> > 
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> 



More information about the erlang-questions mailing list