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

Projects
None yet
2 participants
@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:

Close fds before the child process is executed
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

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

bitprophet added a commit that referenced this pull request Sep 4, 2014

@tolbkni tolbkni deleted the tolbkni:fix-close_fds branch Sep 4, 2014

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