Skip to content

SR-11699: Process: Closing standardInput before calling run() aborts with EBADF #2553

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

Merged
merged 2 commits into from
Nov 4, 2019

Conversation

spevans
Copy link
Contributor

@spevans spevans commented Nov 2, 2019

  • Check the file descriptor passed to _CFPosixSpawnFileActionsAddClose()
    is valid.

…with EBADF

- Check the file descriptor passed to _CFPosixSpawnFileActionsAddClose()
  is valid.
@spevans
Copy link
Contributor Author

spevans commented Nov 2, 2019

@swift-ci test

@Kaiede
Copy link
Contributor

Kaiede commented Nov 2, 2019

Aha, when I looked at this earlier when I hit it, I didn’t have quite enough time to ingest what was going on. This makes a lot of sense now that I’ve had time to read it: not checking to see if the FD is already closed before telling the child process to close it (to avoid the child process to have say, write access to the standard input pipe).

Thanks for the quick turnaround on this one.

@spevans
Copy link
Contributor Author

spevans commented Nov 3, 2019

@swift-ci test linux

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Nov 3, 2019

@swift-ci test linux

- The fix for SR-11699 also fixes connecting two processes with pipes.
@spevans
Copy link
Contributor Author

spevans commented Nov 3, 2019

@swift-ci test linux

1 similar comment
@spevans
Copy link
Contributor Author

spevans commented Nov 3, 2019

@swift-ci test linux

@spevans
Copy link
Contributor Author

spevans commented Nov 4, 2019

@swift-ci test and merge

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

Successfully merging this pull request may close these issues.

2 participants