[perl] sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) fails
Tobias Rehbein
tobias.rehbein at web.de
Fri Mar 27 11:59:08 PDT 2009
Am Thu, Mar 26, 2009 at 10:11:28PM +0000 schrieb Bruce Cran:
>
> sysopen certainly works on FreeBSD:
>
> > perl
> use POSIX;
> sysopen(CD,"/dev/acd0", O_RDONLY|O_NONBLOCK) || perror("sysopen")
>
> and before I fixed the permissions:
>
> > perl
> use POSIX;
> sysopen(CD,"/dev/acd0", O_RDONLY|O_NONBLOCK) || perror("sysopen")
> sysopen: Permission denied
Hm. Tried this and got ineresting results:
> use POSIX;
> sysopen(CD,"/dev/cd0", O_RDONLY|O_NONBLOCK) || perror("sysopen")
works fine, but
> use POSIX;
> sysopen(CD,"/dev/cd0", O_RDONLY|O_NONBLOCK)
> print "$!"
prints "No such file or directory"
Well, I think I'll have to accept that sysopen works but $! does not... After
all sysopen is more important to me ;)
Regards Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090327/82b45018/attachment.pgp
More information about the freebsd-questions
mailing list