[erlang-questions] terminating external port program

Howard Yeh hayeah@REDACTED
Sun Jan 11 22:47:31 CET 2009


On Sun, Jan 11, 2009 at 1:35 PM, Robert Virding <rvirding@REDACTED> wrote:
> Sorry for incomplete reply, my machine seems to keep helping me by
> automatically clicking the mouse. :-)
>
> 2009/1/11 Howard Yeh <hayeah@REDACTED>
>>
>> On Sun, Jan 11, 2009 at 11:11 AM, Howard Yeh <hayeah@REDACTED> wrote:
>>
>>
>> > But writing a wrapper isn't a viable approach... that leaves me with
>> > patching port_info? What's the reason of keeping the process id
>> > hidden?
>> >
>>
>> Answering my own question, the reason to keep process id hidden
>> is that a port isn't always a process, or even local. Right?
>>
>> But why not make it s.t.  erlang:port_close/1 sends a kill signal
>> when the port wraps a process? I can't figure out a reliable way
>> to kill spawned port process if it doesn't "terminate properly".
>
>
> I think one reason not to SIGKILL the process is that it does not give the
> process a chance to clean up before dying. Of course, this doesn't help when
> the process refuses to die as it should.
>
> Robert
>
>



More information about the erlang-questions mailing list