[erlang-questions] open_port and port_close semantics

Dave Bryson daveb@REDACTED
Thu Apr 30 15:53:22 CEST 2009


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
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list