We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
Note the following code in Subprocess+Linux.swift:
// Setup input let fileDescriptors: [CInt] = [ inputReadFileDescriptor?.platformDescriptor() ?? -1, inputWriteFileDescriptor?.platformDescriptor() ?? -1, outputWriteFileDescriptor?.platformDescriptor() ?? -1, outputReadFileDescriptor?.platformDescriptor() ?? -1, // repeated twice errorWriteFileDescriptor?.platformDescriptor() ?? -1, errorWriteFileDescriptor?.platformDescriptor() ?? -1, ]
Here, errorWriteFileDescriptor is passed twice, but fileDescriptors[5] is never accessed anywhere in the codebase.
errorWriteFileDescriptor
fileDescriptors[5]
Additionally, file_descriptors[4] is both dup'ed and closed.
if (file_descriptors[1] >= 0) { rc = close(file_descriptors[1]); } if (file_descriptors[3] >= 0) { rc = close(file_descriptors[3]); } if (file_descriptors[4] >= 0) { rc = close(file_descriptors[4]); }
Was the close code meant to refer to file_descriptors[5], and it just happens to work because the same value is always passed for [4] and [5]?
The text was updated successfully, but these errors were encountered:
Ahh good catch thanks!
Sorry, something went wrong.
iCharlesHu
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Note the following code in Subprocess+Linux.swift:
Here,
errorWriteFileDescriptor
is passed twice, butfileDescriptors[5]
is never accessed anywhere in the codebase.Additionally, file_descriptors[4] is both dup'ed and closed.
Was the close code meant to refer to file_descriptors[5], and it just happens to work because the same value is always passed for [4] and [5]?
The text was updated successfully, but these errors were encountered: