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

Close fds before the child process is executed #1188

Merged
merged 1 commit into from
Sep 4, 2014

Conversation

tolbkni
Copy link

@tolbkni tolbkni commented Sep 2, 2014

All file descriptors except 0, 1 and 2 are closed before the child process is executed. (Unix only)

I call fabric.api.local function to start service in my python application, which open a port to accept HTTP connections, then stop the application, the opened port will be attached to the service! I cannot run my python application again, since the port is already used.

The default value of the executable parameter of the subprocess.Popen function is None, so we don't need the condition if shell is not None:

all file descriptors except 0, 1 and 2 are closed before the child
process is executed. (Unix only)
@bitprophet bitprophet added this to the 1.10 milestone Sep 3, 2014
@bitprophet bitprophet merged commit b56d0b9 into fabric:master Sep 4, 2014
bitprophet added a commit that referenced this pull request Sep 4, 2014
@tolbkni tolbkni deleted the fix-close_fds branch September 4, 2014 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants