| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I'd just remove GetProcessId(), it serves no purpose now. (edit: I guess it ensures that you're always dealing with a uint32_t, which is useful in format strings.) |
Sorry, something went wrong.
|
I just pushed an updated commit that removes it, and just saw your edit. Should I put it back? |
Sorry, something went wrong.
There was a problem hiding this comment.
No, I think it's fine. It's 32 bits on all our platforms so it probably makes no practical difference.
Sorry, something went wrong.
|
We should be consistent -- either it stays and the rest of the code base uses it or it is removed and the code base directly calls uv_os_getpid(). |
Sorry, something went wrong.
|
Can uv_os_getpid() fail? If not it doesn't matter but if it can I guess we could fall back to that stuff? |
Sorry, something went wrong.
|
It cannot. |
Sorry, something went wrong.
|
getpid() can fail on Linux in a seccomp2 sandbox. The sandbox can reject the system call with an ENOSYS error, for example. But that's probably an academical concern, and arguably a bug in the sandbox, not the application. |
Sorry, something went wrong.
|
TIL. We also wouldn't use the old code as a fallback since uv_os_getpid() is built using it 😄 |
Sorry, something went wrong.
This commit uses the new uv_os_getpid() method to retrieve the current process id. PR-URL: nodejs#17415 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Khaidi Chu <i@2333.moe>
Sorry, something went wrong.
This commit uses the new uv_os_getpid() method to retrieve the current process id. PR-URL: #17415 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Khaidi Chu <i@2333.moe>
This commit uses the new uv_os_getpid() method to retrieve the current process id. PR-URL: #17415 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Khaidi Chu <i@2333.moe>
|
Should be good to land in the next 6.x and 8.x releases. |
Sorry, something went wrong.
|
@gibfahn FYI this PR depends on libuv 1.18.0. |
Sorry, something went wrong.
|
@richardlau I think we'll be updating libuv in the next version (as long as it doesn't change gcc requirements) |
Sorry, something went wrong.
This commit uses the new uv_os_getpid() method to retrieve the current process id. PR-URL: #17415 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Khaidi Chu <i@2333.moe>
|
6.x is currently running on libuv 1.16.1, so I'm setting this to don't-land |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This commit uses the new uv_os_getpid() method to retrieve the
current process id.
I currently left GetProcessId() in util.cc. Not sure if it should be removed or not.
Checklist
Affected core subsystem(s)
src