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

glob() and STDIN #338

Closed
p5pRT opened this issue Aug 4, 1999 · 3 comments
Closed

glob() and STDIN #338

p5pRT opened this issue Aug 4, 1999 · 3 comments

Comments

@p5pRT
Copy link

p5pRT commented Aug 4, 1999

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

Searchable as RT1167$

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From kstar@chapin.edu

  The following code works for perl5.005_03 on Linux (I haven't tested
any other releases on Linux), but fails on every other OS I've tried​:

  close STDIN;
  print glob('*');

  On Linux, this prints a list of filenames. On 5.00x_xx/any other OS,
it prints nothing until I comment out the `close STDIN'.

  Any ideas?

  Peace,
* Kurt Starsinic (Kurt.Starsinic@​isinet.com) --------- Technical Specialist *
| `If we knew what it was we were doing, it wouldn't be called |
| research, would it?' -- Albert Einstein |
Institute for Scientific Information http​://www.isinet.com/

@p5pRT
Copy link
Author

p5pRT commented Aug 4, 1999

From @mjdominus

Any ideas?

Many programs on many versions of Unix will fail in bizarre ways, or
even dump code, if you exec them with stdin or stdout closed.
/bin/csh may be one of these.

It is much safer and more portable to use

  open STDIN, '/dev/null';

instead.

@p5pRT
Copy link
Author

p5pRT commented Nov 5, 2000

From The RT System itself

glob() is now internal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant