Glenn Fowler wrote: [CC:'ing ksh93-integration-discuss at opensolaris.org and opensolaris-code at opensolaris.org (note that this is a ksh93 version newer than the one shipped with "ksh93-integration update1", don't worry...)] > On Fri, 12 Dec 2008 22:48:49 +0100 Roland Mainz wrote: > > Glenn Fowler wrote: > > > these aren't errors per se > > > the native system does not have open() semantics for /def/fd/N > > > Uhm... Solaris does have /dev/fd/<fd_num> , e.g. > > -- snip -- > > $ ls -l /dev/fd/ > > total 0 > > crw-rw-rw- 1 root root 346, 0 Dec 12 22:47 0 > ... > > Is there anything special needed ? > > the system having /dev/fd/N is one part of it > the other part is, given fd==3 already open for reading, does > fd = open("/dev/fd/3", O_RDONLY); > simply do > fd = dup(3);
Somehow I suspect this is the case for Solaris... does the POSIX standard say anything about this (I suspect it leaves this item "undefined") and how do other platforms, e.g. FreeBSD, Darwin, Linux behave ? > if so then 3 and fd will have the same seek offsets > the the open() does a real open then 3 and fd will have > independent file struct with independent seek offsets > > or if you really believe the system provides open() semantics > then the test could be flawed I am not sure... that's why I've CC:'ed the *...@opensolaris.org lists for feedback... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 3992797 (;O/ \/ \O;)