Skip to content

Conversation

@sam-github
Copy link
Contributor

@sam-githubsam-github commented Nov 10, 2017

This brings the behaviour in line with the documentation.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

@nodejs-github-botnodejs-github-bot added the process Issues and PRs related to the process subsystem. label Nov 10, 2017
@sam-github
Copy link
ContributorAuthor

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t you want to keep the ===?

@sam-githubsam-githubforce-pushed the kill-allow-numbers branch 2 times, most recently from f8fa77d to 823de05CompareNovember 10, 2017 22:11
Copy link
Contributor

@cjihrigcjihrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the CI is happy. It will need restarted, as the linter failed.

@sam-github
Copy link
ContributorAuthor

Linting is fixed, build and passed locally, will wait for all the platforms to pass before restarting for an all-green run.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this can be simplified to just

common.expectsError(()=>process.kill(1,987),{code: 'EINVAL',type: Error,message: 'kill EINVAL'});

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@sam-githubsam-githubforce-pushed the kill-allow-numbers branch 2 times, most recently from 92235a0 to bfb2503CompareNovember 12, 2017 13:20
@sam-githubsam-github added the semver-minor PRs that contain new features and should be released in the next minor version. label Nov 12, 2017
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

common.expectsError( () => process.kill(1, 'test'),{... }

That is, The first argument needs to be a function...

PR-URL: nodejs#16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
This brings the behaviour in line with the documentation. PR-URL: nodejs#16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
@sam-github
Copy link
ContributorAuthor

@jasnell passed locally, ci running

@addaleax
Copy link
Member

@sam-github Was there a CI run associated with this?

CI: https://ci.nodejs.org/job/node-test-commit/14133/

@addaleaxaddaleax added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Nov 18, 2017
@addaleax
Copy link
Member

@sam-github Looks like this doesn’t work on Windows quite yet

@bzoz
Copy link
Contributor

bzoz commented Nov 20, 2017

On Windows libuv first tries to open the process handle (src/win/process.c:1246) before checking for correct signal. If the signum is invalid, it will raise ENOSYS (src/win/process.c:1215). For this test to work, we would need to change libuv, which I guess would be rather simple.

@sam-github
Copy link
ContributorAuthor

I'll take a look, should have time this week.

@BridgeAR
Copy link
Member

@sam-github there seems to be an issue on Windows:

https://ci.nodejs.org/job/node-test-binary-windows/14617/COMPILED_BY=vs2017,RUNNER=win2016,RUN_SUBSET=0/console

not ok 314 parallel/test-process-kill-pid --- duration_ms: 0.297 severity: fail stack: |- assert.js:72 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: 'ESRCH' strictEqual 'EINVAL' at Object.innerFn (c:\workspace\node-test-binary-windows\test\common\index.js:745:12) at expectedException (assert.js:382:19) at Function.throws (assert.js:427:16) at Object.expectsError (c:\workspace\node-test-binary-windows\test\common\index.js:784:12) at Object.<anonymous> (c:\workspace\node-test-binary-windows\test\parallel\test-process-kill-pid.js:68:8) at Module._compile (module.js:666:30) at Object.Module._extensions..js (module.js:677:10) at Module.load (module.js:578:32) at tryModuleLoad (module.js:518:12) at Function.Module._load (module.js:510:3) 

@BridgeARBridgeAR removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 1, 2018
@bzoz
Copy link
Contributor

bzoz commented Feb 1, 2018

There is no process with PID 1 on Windows. Change those to 0 or process.pid and it should work.

@BridgeAR
Copy link
Member

Ping @sam-github

@BridgeAR
Copy link
Member

I pushed the fix that @bzoz suggested.

CI https://ci.nodejs.org/job/node-test-pull-request/13229/

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 17, 2018
@bzoz
Copy link
Contributor

bzoz commented Feb 17, 2018

CI failures on Windows are unrelated

@BridgeAR
Copy link
Member

Running one more CI before landing.

https://ci.nodejs.org/job/node-test-pull-request/13242/

@BridgeAR
Copy link
Member

Landed in 7ca4ca8 🎉

BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Feb 17, 2018
This brings the behaviour in line with the documentation. PR-URL: nodejs#16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
This brings the behaviour in line with the documentation. PR-URL: #16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Feb 21, 2018
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
This brings the behaviour in line with the documentation. PR-URL: #16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins added a commit that referenced this pull request Feb 21, 2018
Notable changes: * async_hooks: - deprecate unsafe emit{Before,After} (Ali Ijaz Sheikh) #18513 - rename PromiseWrap.parentId to PromiseWrap.isChainedPromise (Ali Ijaz Sheikh) #18633 * deps: - update node-inspect to 1.11.3 (Jan Krems) #18354 - ICU 60.2 bump (Steven R. Loomis) #17687 - Introduce ScriptOrModule and HostDefinedOptions to V8 (Jan Krems) #16889 * http: - add options to http.createServer() for `IncomingMessage` and `ServerReponse` (Peter Marton) #15752 * http2: - add http fallback options to .createServer (Peter Marton) #15752 * https: - Adds the remaining options from tls.createSecureContext() to the string generated by Agent#getName(). This allows https.request() to accept the options and generate unique sockets appropriately. (Jeff Principe) #16402 * inspector: - --inspect-brk for es modules (Guy Bedford) #18194 * lib: - allow process kill by signal number (Sam Roberts) #16944 * module: - enable dynamic import (Myles Borins) #18387 - dynamic import is now supported (Jan Krems) #15713 * napi: - add methods to open/close callback scope (Michael Dawson) #18089 * src: - allow --perf-(basic-)?prof in NODE_OPTIONS (Leko) #17600 * vm: - add support for es modules (Gus Caplan) #17560 PR-URL: #18902
MylesBorins pushed a commit that referenced this pull request Feb 21, 2018
This brings the behaviour in line with the documentation. PR-URL: #16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
MylesBorins added a commit that referenced this pull request Feb 21, 2018
Notable changes: * async_hooks: - deprecate unsafe emit{Before,After} (Ali Ijaz Sheikh) #18513 - rename PromiseWrap.parentId to PromiseWrap.isChainedPromise (Ali Ijaz Sheikh) #18633 * deps: - update node-inspect to 1.11.3 (Jan Krems) #18354 - ICU 60.2 bump (Steven R. Loomis) #17687 - Introduce ScriptOrModule and HostDefinedOptions to V8 (Jan Krems) #16889 * http: - add options to http.createServer() for `IncomingMessage` and `ServerReponse` (Peter Marton) #15752 * http2: - add http fallback options to .createServer (Peter Marton) #15752 * https: - Adds the remaining options from tls.createSecureContext() to the string generated by Agent#getName(). This allows https.request() to accept the options and generate unique sockets appropriately. (Jeff Principe) #16402 * inspector: - --inspect-brk for es modules (Guy Bedford) #18194 * lib: - allow process kill by signal number (Sam Roberts) #16944 * module: - enable dynamic import (Myles Borins) #18387 - dynamic import is now supported (Jan Krems) #15713 * napi: - add methods to open/close callback scope (Michael Dawson) #18089 * src: - allow --perf-(basic-)?prof in NODE_OPTIONS (Leko) #17600 * vm: - add support for es modules (Gus Caplan) #17560 PR-URL: #18902
MylesBorins added a commit that referenced this pull request Feb 22, 2018
Notable changes: * async_hooks: - deprecate unsafe emit{Before,After} (Ali Ijaz Sheikh) #18513 - rename PromiseWrap.parentId to PromiseWrap.isChainedPromise (Ali Ijaz Sheikh) #18633 * deps: - update node-inspect to 1.11.3 (Jan Krems) #18354 - ICU 60.2 bump (Steven R. Loomis) #17687 - Introduce ScriptOrModule and HostDefinedOptions to V8 (Jan Krems) #16889 * http: - add options to http.createServer() for `IncomingMessage` and `ServerReponse` (Peter Marton) #15752 * http2: - add http fallback options to .createServer (Peter Marton) #15752 * https: - Adds the remaining options from tls.createSecureContext() to the string generated by Agent#getName(). This allows https.request() to accept the options and generate unique sockets appropriately. (Jeff Principe) #16402 * inspector: - --inspect-brk for es modules (Guy Bedford) #18194 * lib: - allow process kill by signal number (Sam Roberts) #16944 * module: - enable dynamic import (Myles Borins) #18387 - dynamic import is now supported (Jan Krems) #15713 * napi: - add methods to open/close callback scope (Michael Dawson) #18089 * src: - allow --perf-(basic-)?prof in NODE_OPTIONS (Leko) #17600 * vm: - add support for es modules (Gus Caplan) #17560 PR-URL: #18902
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
This brings the behaviour in line with the documentation. PR-URL: nodejs#16944 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]>
MayaLekova pushed a commit to MayaLekova/node that referenced this pull request May 8, 2018
Notable changes: * async_hooks: - deprecate unsafe emit{Before,After} (Ali Ijaz Sheikh) nodejs#18513 - rename PromiseWrap.parentId to PromiseWrap.isChainedPromise (Ali Ijaz Sheikh) nodejs#18633 * deps: - update node-inspect to 1.11.3 (Jan Krems) nodejs#18354 - ICU 60.2 bump (Steven R. Loomis) nodejs#17687 - Introduce ScriptOrModule and HostDefinedOptions to V8 (Jan Krems) nodejs#16889 * http: - add options to http.createServer() for `IncomingMessage` and `ServerReponse` (Peter Marton) nodejs#15752 * http2: - add http fallback options to .createServer (Peter Marton) nodejs#15752 * https: - Adds the remaining options from tls.createSecureContext() to the string generated by Agent#getName(). This allows https.request() to accept the options and generate unique sockets appropriately. (Jeff Principe) nodejs#16402 * inspector: - --inspect-brk for es modules (Guy Bedford) nodejs#18194 * lib: - allow process kill by signal number (Sam Roberts) nodejs#16944 * module: - enable dynamic import (Myles Borins) nodejs#18387 - dynamic import is now supported (Jan Krems) nodejs#15713 * napi: - add methods to open/close callback scope (Michael Dawson) nodejs#18089 * src: - allow --perf-(basic-)?prof in NODE_OPTIONS (Leko) nodejs#17600 * vm: - add support for es modules (Gus Caplan) nodejs#17560 PR-URL: nodejs#18902
@MylesBorins
Copy link
Contributor

Should this be backported to v8.x-staging? If yes please follow the guide and raise a backport PR, if not let me know or add the dont-land-on label.

@sam-githubsam-github deleted the kill-allow-numbers branch October 16, 2018 17:12
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.processIssues and PRs related to the process subsystem.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@sam-github@addaleax@bzoz@BridgeAR@MylesBorins@jasnell@cjihrig@nodejs-github-bot