[erlang-questions] Unix domain sockets

Sargun Dhillon <>
Tue Mar 31 02:04:59 CEST 2009


Apparently this doesn't work for character or block devices, see here:
[running beam as root]
1> FOut = file:open("/dev/net/tun", [read, write]).
{error,eisdir}
2> FOut1 = file:open("/dev/net/tun", [read, write, raw]).
{error,eisdir}
3> FOut3 = file:open("/dev/sda", [read, write, raw]).
{error,eisdir}
4> FOut3 = file:open("/dev/sda", [read, write]).
{error,eisdir}

lucifer ~ # ls -l /dev/net/tun
crw-rw-rw- 1 root root 10, 200 Mar 30 16:51 /dev/net/tun
lucifer ~ # ls -l /dev/sda
brw-r----- 1 root disk 8, 0 Mar 30 09:27 /dev/sda

Any ideas on how to read this? Do I need to break out a port driver?

2009/3/8 Antoine Koener <>:
> And what about the support for NamedPipes on windows ?
> Anyone with experience ?
> On Fri, Mar 6, 2009 at 3:24 AM, Richard Andrews <> wrote:
>>
>> IIRC there was a UNIX socket project in jungerl too.
>>
>>
>>
>>
>> > There's an example driver for unix domain sockets under
>> > $OTP_ROOT/lib/kernel/examples/uds_dist/
>> >
>> > (It's still there in R13A-0, BTW.)
>> >
>> > It used to be documented in the Interoperability Tutorial, but
>> > I think they've switched to a different example now.
>>
>>
>>      Stay connected to the people that matter most with a smarter inbox.
>> Take a look http://au.docs.yahoo.com/mail/smarterinbox
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
>
> --
>
> http://easyerl.blogspot.com/
> http://www.open-tools.org/
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list