Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/internal/bootstrap/switches/does_own_process_state.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ function wrapPosixCredentialSetters(credentials) {
function wrapIdSetter(type, method) {
return function(id) {
validateId(id, 'id');
// Coerce -0 into 0, because that is the most reasonable thing
// for system calls
if (id === -0) id = 0;
// Result is 0 on success, 1 if credential is unknown.
const result = method(id);
if (result === 1) {
Expand Down