Skip to content

Conversation

@cjihrig
Copy link
Contributor

94b9948 added unistd.h to src/env.cc in order to use getpid(). However, this doesn't exist on Windows. This commit conditionally defines getpid() based on the OS.

Closes#4145
R=@mscdex

@mscdex
Copy link
Contributor

I believe we can forgo including process.h on Windows and just alias getpid to GetCurrentProcessId instead, which shouldn't require any additional includes.

@cjihrig
Copy link
ContributorAuthor

I think you're right. Updating.

@cjihrig
Copy link
ContributorAuthor

Updated.

@cjihrig
Copy link
ContributorAuthor

@cjihrig
Copy link
ContributorAuthor

Only CI failures are known flakey tests.

@mscdex
Copy link
Contributor

LGTM

@cjihrigcjihrig closed this Dec 4, 2015
cjihrig added a commit to cjihrig/node that referenced this pull request Dec 4, 2015
94b9948 added unistd.h to src/env.cc in order to use getpid(). However, this doesn't exist on Windows. This commit conditionally defines getpid() based on the OS. Fixes: nodejs#4145 PR-URL: nodejs#4146 Reviewed-By: Brian White <[email protected]>
@cjihrigcjihrig deleted the 4145 branch December 4, 2015 02:25
@cjihrigcjihrig merged commit a9c0c65 into nodejs:masterDec 4, 2015
@cjihrig
Copy link
ContributorAuthor

Thanks for the review. Landing this more quickly than normal since the Windows CI was borked.

@rvagg
Copy link
Member

rvagg commented Dec 5, 2015

commits missing again, perhaps this is what github is doing now if you don't update your PR with the latest version of the commits and delete the branch?

cjihrig added a commit that referenced this pull request Dec 5, 2015
94b9948 added unistd.h to src/env.cc in order to use getpid(). However, this doesn't exist on Windows. This commit conditionally defines getpid() based on the OS. Fixes: #4145 PR-URL: #4146 Reviewed-By: Brian White <[email protected]>
@rvaggrvagg mentioned this pull request Dec 17, 2015
@jasnelljasnell added os Issues and PRs related to the os subsystem. lib / src Issues and PRs related to general changes in the lib or src directory. lts-watch-v4.x and removed os Issues and PRs related to the os subsystem. labels Dec 17, 2015
@MylesBorins
Copy link
Contributor

94b9948 was semver major so I do not believe this patch should be backported. @jasnell feel free to modify.

scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
94b9948 added unistd.h to src/env.cc in order to use getpid(). However, this doesn't exist on Windows. This commit conditionally defines getpid() based on the OS. Fixes: nodejs#4145 PR-URL: nodejs#4146 Reviewed-By: Brian White <[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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@cjihrig@mscdex@rvagg@MylesBorins@jasnell