From owner-freebsd-questions@FreeBSD.ORG Fri Mar 27 20:30:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB70A106564A for ; Fri, 27 Mar 2009 20:30:20 +0000 (UTC) (envelope-from tobias.rehbein@web.de) Received: from fmmailgate01.web.de (fmmailgate01.web.de [217.72.192.221]) by mx1.freebsd.org (Postfix) with ESMTP id 7402B8FC0A for ; Fri, 27 Mar 2009 20:30:20 +0000 (UTC) (envelope-from tobias.rehbein@web.de) Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id A7239FF13666; Fri, 27 Mar 2009 21:30:19 +0100 (CET) Received: from [95.88.231.222] (helo=sushi.pseudo.local) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.110 #277) id 1LnIh1-0003PA-00; Fri, 27 Mar 2009 21:30:19 +0100 Received: from sushi.pseudo.local (localhost [127.0.0.1]) by sushi.pseudo.local (8.14.3/8.14.3) with ESMTP id n2RKUQTL050326; Fri, 27 Mar 2009 21:30:26 +0100 (CET) (envelope-from tobi@sushi.pseudo.local) Received: (from tobi@localhost) by sushi.pseudo.local (8.14.3/8.14.3/Submit) id n2RKUQwZ050325; Fri, 27 Mar 2009 21:30:26 +0100 (CET) (envelope-from tobi) Date: Fri, 27 Mar 2009 21:30:26 +0100 From: Tobias Rehbein To: Joost Bekkers Message-ID: <20090327203026.GA50021@sushi.pseudo.local> Mail-Followup-To: Joost Bekkers , freebsd-questions@freebsd.org References: <20090326212045.GB3134@sushi.pseudo.local> <20090326221128.3a6d648f@gluon.draftnet> <20090327185912.GA77908@sushi.pseudo.local> <1772.192.168.100.227.1238185193.squirrel@jodocus.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3MwIy2ne0vdjdPXF" Content-Disposition: inline In-Reply-To: <1772.192.168.100.227.1238185193.squirrel@jodocus.org> User-Agent: Mutt/1.4.2.3i Sender: tobias.rehbein@web.de X-Sender: tobias.rehbein@web.de X-Provags-ID: V01U2FsdGVkX19ZmodGqEqrmv6uhpNORDtocaw+dTqqyVNuRpjX x50wlCYasP9FMIIyqm6cVFsgAiPhap54pPPJvboNWouFTw/orT HmzplaC5FtLvCWo9vnSg== Cc: freebsd-questions@freebsd.org Subject: Re: [perl] sysopen(CD, "/dev/cd0", O_RDONLY | O_NONBLOCK) fails X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2009 20:30:21 -0000 --3MwIy2ne0vdjdPXF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am Fri, Mar 27, 2009 at 09:19:53PM +0100 schrieb Joost Bekkers: > On Fri, March 27, 2009 19:59, Tobias Rehbein wrote: > > Am Thu, Mar 26, 2009 at 10:11:28PM +0000 schrieb Bruce Cran: > >> > > 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 ;) >=20 > As the perlvar manpage tells us: >=20 > $! If used numerically, yields the current value of the C "errno" > variable, or in other words, if a system or library call fails, > it sets this variable. This means that the value of $! is > meaningful only immediately after a failure. >=20 > The value of $! is NOT an indicator of success or failure. It only tells > you why something failed. If something succeeded $! is usualy left > untouched. Yes, that sounds sensible. Thanks for clarification. --=20 Tobias Rehbein PGP key: 4F2AE314 server: keys.gnupg.net fingerprint: ECDA F300 1B6E 9B87 8524 8663 E8B6 3138 4F2A E314 --3MwIy2ne0vdjdPXF Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAknNN2EACgkQ6LYxOE8q4xQpIACfY4yM552TV+wMfHuBcnyppSKU R2QAnjNTR3JU5Zl4QQauGNPwbtBRVGID =V3zI -----END PGP SIGNATURE----- --3MwIy2ne0vdjdPXF--