<dl><dt>Unfortunately, the documentation implies that this is not allowed:<br>
<span class="code"></span></dt><dt><br></dt><dt><span class="code">eisdir</span>
</dt><dd>

The named file is not a regular file. It may be a
directory, a fifo, or a device.</dd></dl><br>I'm a little dismayed at this; I was planning on using a char driver soon by opening it as a file and then attaching a port to it with open_port({fd,...).  I guess I will be doing it a different way...  Likely a whole port program.<br>
<br>Dan.<br><br><div class="gmail_quote">On Mon, Mar 30, 2009 at 7:04 PM, Sargun Dhillon <span dir="ltr"><<a href="mailto:xbmodder@gmail.com">xbmodder@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Apparently this doesn't work for character or block devices, see here:<br>
[running beam as root]<br>
1> FOut = file:open("/dev/net/tun", [read, write]).<br>
{error,eisdir}<br>
2> FOut1 = file:open("/dev/net/tun", [read, write, raw]).<br>
{error,eisdir}<br>
3> FOut3 = file:open("/dev/sda", [read, write, raw]).<br>
{error,eisdir}<br>
4> FOut3 = file:open("/dev/sda", [read, write]).<br>
{error,eisdir}<br>
<br>
lucifer ~ # ls -l /dev/net/tun<br>
crw-rw-rw- 1 root root 10, 200 Mar 30 16:51 /dev/net/tun<br>
lucifer ~ # ls -l /dev/sda<br>
brw-r----- 1 root disk 8, 0 Mar 30 09:27 /dev/sda<br>
<br>
Any ideas on how to read this? Do I need to break out a port driver?<br>
<br>
2009/3/8 Antoine Koener <<a href="mailto:antoine.koener@gmail.com">antoine.koener@gmail.com</a>>:<br>
<div><div></div><div class="h5">> And what about the support for NamedPipes on windows ?<br>
> Anyone with experience ?<br>
> On Fri, Mar 6, 2009 at 3:24 AM, Richard Andrews <<a href="mailto:bbmaj7@yahoo.com.au">bbmaj7@yahoo.com.au</a>> wrote:<br>
>><br>
>> IIRC there was a UNIX socket project in jungerl too.<br>
>><br>
>><br>
>><br>
>><br>
>> > There's an example driver for unix domain sockets under<br>
>> > $OTP_ROOT/lib/kernel/examples/uds_dist/<br>
>> ><br>
>> > (It's still there in R13A-0, BTW.)<br>
>> ><br>
>> > It used to be documented in the Interoperability Tutorial, but<br>
>> > I think they've switched to a different example now.<br>
>><br>
>><br>
>>      Stay connected to the people that matter most with a smarter inbox.<br>
>> Take a look <a href="http://au.docs.yahoo.com/mail/smarterinbox" target="_blank">http://au.docs.yahoo.com/mail/smarterinbox</a><br>
>> _______________________________________________<br>
>> erlang-questions mailing list<br>
>> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
>> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
><br>
><br>
> --<br>
><br>
> <a href="http://easyerl.blogspot.com/" target="_blank">http://easyerl.blogspot.com/</a><br>
> <a href="http://www.open-tools.org/" target="_blank">http://www.open-tools.org/</a><br>
><br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Daniel Goertzen<br>-----------------<br>work email: <a href="mailto:dang@networkintegritysystems.com">dang@networkintegritysystems.com</a><br>work phone: 1 443 303 8525<br>
work sip: <a href="mailto:945050@fwd.pulver.com">945050@fwd.pulver.com</a><br>-----------------<br>mobile: 1 204 470 8360<br>-----------------<br>home email: <a href="mailto:daniel.goertzen@gmail.com">daniel.goertzen@gmail.com</a><br>
home phone: 1 204 272 6149<br><br><br>