-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
child_process: define EACCES as a runtime error #19294
Conversation
Access permission on the target child is currently thrown as an exception. Bring this under the runtime error definition, much like ENOENT and friends. Fixes: nodejs/help#990
Access permission on the target child is currently thrown as an exception. Bring this under the runtime error definition, much like ENOENT and friends. PR-URL: #19294 Fixes: nodejs/help#990 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
landed as 11b6c0d , thanks. |
semver-patch or major? |
@targos - It changes the external behavior, I don't know how to classify it though. [ An executable file that has come for launch through child_process.spawn* / exec* family of functions, and the current user does not have execute permission on it, will throw exception prior to this PR. With this, it will now be contained in the child_process handles' error handler. ] |
I've conservatively tagged this semver-major. |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAccess permission on the target child is currently thrown as an exception. Bring this under the runtime error definition, much like ENOENT and friends.
Fixes: nodejs/help#990
#cat 990.js
#node 990.js ./a.out
ENOENT
#touch a.out
#l a.out
-rw-r--r-- 1 gireesh staff 0 Mar 12 13:41 a.out
#node 990.js ./a.out
while the the definition of runtime errors can be arguable (anything after fork vs. anything after the exec), EACCES belongs to the same group of ENOENT, by all means.
With this fix:
#node 990.js ./a.out
EACCES