[erlang-questions] How does Erlang kill port processes?
Sun Jul 16 19:39:43 CEST 2017
The Erlang runtime doesn't actually kill the port, but just closes the
pipe. You port should then detect an end-of-file on its input pipe.
On Sun, Jul 16, 2017 at 6:28 PM, Albin Stigö <> wrote:
> I have a program that relies on C API calls to the Linux bluetooth
> stack (bluez) so I wrote a port program for that...
> There seems to be a bug in the version of the bluez stack I'm using
> that requires programs to clean up after themselves or the program
> will fail on the next execution (I guess some garbage state in driver
> / hardware).
> I have tried to catch SIGPIPE/SIGTERM and check for EPIPE in my port
> but it doesn't seem to work. How does Erlang kill ports? SIGKILL?
> Any ideas on how to clean up on exit..? I realise this is very fragile
> but as of now I need to work around this bug...
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions