Date: Fri, 27 Mar 2009 19:59:12 +0100 From: Tobias Rehbein <tobias.rehbein@web.de> To: Bruce Cran <bruce@cran.org.uk> Cc: freebsd-questions@freebsd.org Subject: Re: [perl] sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) fails Message-ID: <20090327185912.GA77908@sushi.pseudo.local> In-Reply-To: <20090326221128.3a6d648f@gluon.draftnet> References: <20090326212045.GB3134@sushi.pseudo.local> <20090326221128.3a6d648f@gluon.draftnet>
next in thread | previous in thread | raw e-mail | index | archive | help
--ew6BAiZeqk4r7MaW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Am Thu, Mar 26, 2009 at 10:11:28PM +0000 schrieb Bruce Cran:
>=20
> sysopen certainly works on FreeBSD:
>=20
> > perl
> use POSIX;
> sysopen(CD,"/dev/acd0", O_RDONLY|O_NONBLOCK) || perror("sysopen")
>=20
> and before I fixed the permissions:
>=20
> > 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... Aft=
er
all sysopen is more important to me ;)
Regards Tobias
--ew6BAiZeqk4r7MaW
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (FreeBSD)
iEYEARECAAYFAknNIf8ACgkQ6LYxOE8q4xTxbgCeMivgVE0JsYcPBwixqH8xzVMY
2tYAoMOd5RfMpP1zVJThVkH6vc7uICNT
=SU+y
-----END PGP SIGNATURE-----
--ew6BAiZeqk4r7MaW--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090327185912.GA77908>
