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

pipe doesn't set close-on-exec #797

Closed
p5pRT opened this issue Oct 29, 1999 · 4 comments
Closed

pipe doesn't set close-on-exec #797

p5pRT opened this issue Oct 29, 1999 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 29, 1999

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

Searchable as RT1724$

@p5pRT
Copy link
Author

p5pRT commented Oct 29, 1999

From tlb@yahoo-inc.com

Pipes are exactly the sort of situation where this matters.

I currently have to do things like this a lot​:

  pipe(TO_SSH_RFH,TO_SSH_WFH);
  pipe(FROM_SSH_RFH,FROM_SSH_WFH);

  for (\*TO_SSH_RFH,\*TO_SSH_WFH,\*FROM_SSH_RFH,\*FROM_SSH_WFH) {
  fcntl($_,F_SETFD,1);
  }

--
Trevor Blackwell tlb@​yahoo-inc.com (408) 530-5012
http​://store.yahoo.com/

@p5pRT
Copy link
Author

p5pRT commented Oct 19, 2006

From @smpeters

On Fri Oct 29 04​:12​:57 1999, tlb@​yahoo-inc.com wrote​:

Pipes are exactly the sort of situation where this matters.

I currently have to do things like this a lot​:

pipe\(TO\_SSH\_RFH\,TO\_SSH\_WFH\);
pipe\(FROM\_SSH\_RFH\,FROM\_SSH\_WFH\);

for \(\\\*TO\_SSH\_RFH\,\\\*TO\_SSH\_WFH\,\\\*FROM\_SSH\_RFH\,\\\*FROM\_SSH\_WFH\) \{
    fcntl\($\_\,F\_SETFD\,1\);
\}

This appears to have been taken care of with Perl 5.6.1. From the
changes file....

  More consistent close-on-exec behavior

  On systems that support a close-on-exec flag on filehandles, the flag is
  now set for any handles created by pipe(), socketpair(), socket(), and
  accept(), if that is warranted by the value of $^F that may be in
  effect. Earlier versions neglected to set the flag for handles created
  with these operators. See the pipe entry in the perlfunc manpage, the
  socketpair entry in the perlfunc manpage, the socket entry in the
  perlfunc manpage, the accept entry in the perlfunc manpage, and the
  section on "$^F" in the perlvar manpage.

@p5pRT
Copy link
Author

p5pRT commented Oct 19, 2006

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

@p5pRT
Copy link
Author

p5pRT commented Oct 19, 2006

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

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