|
file: module and character special files: msg#00306lang.erlang.general
I'm running Erlang/OTP R9C on a SunBlade 100 running Solaris 2.9. I wanted to test some file I/O code I had written, and for obvious reasons used /dev/null as a test file. The results were surprising and the cause disappointing (to put it politely). Erlang (BEAM) emulator version 5.3 [source] [hipe] [threads:0] Eshell V5.3 (abort with ^G) 1> file:open('/dev/null', [read]). {error,eisdir} 2> file:open('/dev/null', [write]). {error,eisdir} /dev/null is a perfectly good file. It is not a directory. In Solaris 2.9, /dev/null is a symbolic link to this character special file: crw-rw-rw- 1 root sys 13, 2 Jan 29 15:44 /devices/pseudo/mm@0:null As you see, on my system there are no file permission reasons why this important and useful file should be forbidden to Erlang code. 3> file:open('/dev/tty', [read]). {error,eisdir} 4> file:open('/dev/tty', [write]). {error,eisdir} Poking around a bit more, I find that opening _any_ character special file seems to be forbidden. I don't mind not being able to seek on these things, but surely I don't have to be able to seek in order to just plain read and write? PS: I can't find documentation for inets/src/http.erl. Where should I be looking? |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Wanted: Concurrent benchmarks: 00306, Richard Carlsson |
|---|---|
| Next by Date: | ets concurrency: 00306, Vance Shipley |
| Previous by Thread: | Wanted: Concurrent benchmarksi: 00306, Richard Carlsson |
| Next by Thread: | RE: file: module and character special files: 00306, Erik Stenman |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |