develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #117265] [PATCH] e213661 no warnings 'safesyscalls', fatal nul checks

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
June 28, 2013 06:56
Subject:
[perl #117265] [PATCH] e213661 no warnings 'safesyscalls', fatal nul checks
Message ID:
rt-3.6.HEAD-2552-1372402587-459.117265-15-0@perl.org
On Sat Mar 23 17:12:20 2013, perl.p5p@rjbs.manxome.org wrote:
> * Lukas Mai <plokinom@gmail.com> [2013-03-23T11:34:47]
> > >I explicitly allow typical harmless programmer errors adding another \0
> > >at the end.
> > 
> > My favorite semantics would be to not treat \0 specially, regardless of
> > warnings. That means failing with ENOENT if you pass such a string to
> > open, unlink, stat, ... etc, because as far as Perl is concerned, there
> > is a \0 in that string, and as far as the file system is concerned, no
> > such file exists. Similarly, glob("*\0") should return ().
> 
> This is also my feeling on the topic.

And mine, too.  Just to be clear, in case we misunderstand each other,
that means no warnings, just a failed system call, which will be
detected by the existing error checking code.  (You *do* check the
return values of your system calls, right? :-)

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=117265

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About