Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

slurp() on a directory does not die on OpenBSD #3458

Closed
p6rt opened this issue Jul 21, 2014 · 5 comments
Closed

slurp() on a directory does not die on OpenBSD #3458

p6rt opened this issue Jul 21, 2014 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 21, 2014

Migrated from rt.perl.org#122358 (status was 'resolved')

Searchable as RT122358$

@p6rt
Copy link
Author

p6rt commented Jul 21, 2014

From @carbin

The test "slurp() on directories fails" in S32-io/slurp.t does not pass
on OpenBSD as slurp() on a directory does not seem to die on OpenBSD.

Tested with Moar/Rakudo

OpenBSD (running on VirtualBox 4.2.18_OSE r88780)​:

  $ perl6 -e 'slurp "t/"' # (no output)
  $ perl6 -e 'my $x = slurp "t/"; say $x.WHAT; say $x.perl'
  (Str)
  ""

  $ uname -srvm
  OpenBSD 5.5 GENERIC.MP#​315 amd64

Linux​:

  $ perl6 -e 'slurp "t/"'
  Reading from filehandle failed​: illegal operation on a directory

@p6rt
Copy link
Author

p6rt commented Jul 23, 2014

From @geekosaur

On Mon, Jul 21, 2014 at 6​:39 PM, Carlin Bingham <
perl6-bugs-followup@​perl.org> wrote​:

The test "slurp() on directories fails" in S32-io/slurp.t does not pass
on OpenBSD as slurp() on a directory does not seem to die on OpenBSD.

BSDs tend to preserve the original Unix directory semantics where a
directory could be opened read-only as a normal file. Do not rely on the OS
to enforce special treatment of directories.

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented Jul 23, 2014

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jul 28, 2014

From @carbin

On Mon Jul 21 15​:39​:51 2014, carlin wrote​:

The test "slurp() on directories fails" in S32-io/slurp.t does not pass
on OpenBSD as slurp() on a directory does not seem to die on OpenBSD.

Tested with Moar/Rakudo

OpenBSD (running on VirtualBox 4.2.18_OSE r88780)​:

$ perl6 \-e 'slurp "t/"'        \# \(no output\)
$ perl6 \-e 'my $x = slurp "t/"; say $x\.WHAT; say $x\.perl'
\(Str\)
""

$ uname \-srvm
OpenBSD 5\.5 GENERIC\.MP#&#8203;315 amd64

Linux​:

$ perl6 \-e 'slurp "t/"'
Reading from filehandle failed&#8203;: illegal operation on a directory

Fixed in rakudo d3988a9
More tests for the various situations added in roast bffb32147a

Marking as resolved

--
Carlin

@p6rt
Copy link
Author

p6rt commented Jul 28, 2014

@carbin - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jul 28, 2014
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant