Skip to content

Conversation

@bnoordhuis
Copy link
Member

Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc
use GetCurrentProcessId() on Windows for the PID in log messages.
GetCurrentProcessId() is also what is used by libuv, OpenSSL and V8.

This commit makes process.pid use GetCurrentProcessId() instead of
_getpid() for consistency.

R=@cjihrig?

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

@bnoordhuisbnoordhuis added the windows Issues and PRs related to the Windows platform. label Dec 5, 2015
@bnoordhuis
Copy link
MemberAuthor

Refs #4146.

@rvagg
Copy link
Member

rvagg commented Dec 5, 2015

lgtm pending CI, +1 for consistency even though I can't find any information about _getpid vs GetProcessId

@bnoordhuis
Copy link
MemberAuthor

There are failures on the Windows buildbots but they are all known flakes (#3956, #3957, #4057).

@cjihrig
Copy link
Contributor

LGTM

@mscdex
Copy link
Contributor

LGTM.

@rvagg I believe _getpid() calls GetCurrentProcessId() internally.

@mscdexmscdex added the lib / src Issues and PRs related to general changes in the lib or src directory. label Dec 5, 2015
Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: nodejs#4163 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
@bnoordhuisbnoordhuis deleted the process-pid-windows branch December 5, 2015 16:14
@bnoordhuisbnoordhuis merged commit e6e7891 into nodejs:masterDec 5, 2015
bnoordhuis added a commit that referenced this pull request Dec 8, 2015
Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: #4163 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
@rvaggrvagg mentioned this pull request Dec 17, 2015
bnoordhuis added a commit that referenced this pull request Dec 29, 2015
Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: #4163 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
MylesBorins pushed a commit that referenced this pull request Jan 19, 2016
Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: #4163 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 19, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Commit a9c0c65 ("src: define getpid() based on OS") made src/env.cc use `GetCurrentProcessId()` on Windows for the PID in log messages. `GetCurrentProcessId()` is also what is used by libuv, OpenSSL and V8. This commit makes `process.pid` use `GetCurrentProcessId()` instead of `_getpid()` for consistency. PR-URL: nodejs#4163 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rod Vagg <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / srcIssues and PRs related to general changes in the lib or src directory.windowsIssues and PRs related to the Windows platform.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@bnoordhuis@rvagg@cjihrig@mscdex@jasnell@MylesBorins