Skip to content

test: fix common.isAlive()#24756

Closed
Trott wants to merge 1 commit intonodejs:masterfrom
Trott:continue-zero
Closed

test: fix common.isAlive()#24756
Trott wants to merge 1 commit intonodejs:masterfrom
Trott:continue-zero

Conversation

@Trott
Copy link
Member

@Trott Trott commented Nov 30, 2018

Use signal value 0 rather than 'SIGCONT' as the latter appears to
behave unexpectedly on Alpine 3.8.

Fixes: #22308

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Use signal value `0` rather than `'SIGCONT'` as the latter appears to
behave unexpectedly on Alpine 3.8.

Fixes: nodejs#22308
@Trott Trott added wip Issues and PRs that are still a work in progress. test Issues and PRs related to the tests. labels Nov 30, 2018
@nodejs-github-bot
Copy link
Collaborator

function isAlive(pid) {
try {
process.kill(pid, 'SIGCONT');
process.kill(pid, 0);
Copy link
Member

Choose a reason for hiding this comment

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

I'm not convinced this is likely to be the cause unless the tests in question are also using SIGSTOP. process.kill is asynchronous and should only throw if the pid (which appears to be the intention for isAlive()) or signal is invalid.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I'm kind of flinging this against the wall to see if it works. (And CI came back and it didn't work.)

Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't read the context here, but I can confirm that 0 is the correct signal to use to check for process existence, and it is has specific support for this purpose on Windows:

case 0: {

@Trott Trott closed this Nov 30, 2018
@Trott Trott deleted the continue-zero branch January 13, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Issues and PRs related to the tests. wip Issues and PRs that are still a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alpine 3.8 cluster failures

4 participants