[erlang-questions] open_port and port_close semantics

Richard Andrews <>
Thu Apr 30 14:00:34 CEST 2009


On close a port program may need to perform additional steps to close down gracefully, turn off hardware, log out of facilities, remove files, log events, etc.

A heartbeat system is effective if the pipe closure event is not reliably delivered; ie. exit if no event from the erlang node for N seconds.

If erlang is exiting gracefully then send a shutdown command to the port program and wait for the port to be closed.

--
  Rich




________________________________
From: Camille Troillard <>
To: 
Sent: Thursday, 30 April, 2009 8:50:09 PM
Subject: [erlang-questions] open_port and port_close semantics

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?



      Yahoo!7 recommends that you update your browser to the new Internet Explorer 8.Get it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090430/1913b7e3/attachment.html>


More information about the erlang-questions mailing list