Re: Fix io:xxxx(self()) no return

Stefan Zegenhagen <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches
Organization arcutronix GmbH
Message-ID <1370251026.3947.38.camel@ax-sze>
Dear Eric,

> here is a patch that fix the bug I found.
> 
> git fetch https://github.com/crownedgrouse/otp.git
> fix_io_noreturn_with_self_pid

I would like to note that there might be cases where

group_leader() =:= self()

In that case, your patch would cause an infinite loop.

Please note that the pid passed to io:xxx() should be the pid of an I/O
server that speaks the I/O protocol. The io:xxx() functions are not
meant to be passed *ANY* pid.

It surely is bad to have a process lock up easily just by calling
io:xxx(self(), ...), but I'd rather prefer to return {error, enotsup} in
that case. The caller should probably do the call to group_leader() if
it needs to.


Kind regards,

-- 
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: [email protected]
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.

_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.