|
|
@ -190,18 +190,25 @@ The shell that executed node should see the exit code as 1. |
|
|
|
|
|
|
|
## process.getgid() |
|
|
|
|
|
|
|
Note: this function is only available on POSIX platforms (i.e. not Windows) |
|
|
|
|
|
|
|
Gets the group identity of the process. (See getgid(2).) |
|
|
|
This is the numerical group id, not the group name. |
|
|
|
|
|
|
|
if (process.getgid) { |
|
|
|
console.log('Current gid: ' + process.getgid()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
## process.setgid(id) |
|
|
|
|
|
|
|
Note: this function is only available on POSIX platforms (i.e. not Windows) |
|
|
|
|
|
|
|
Sets the group identity of the process. (See setgid(2).) This accepts either |
|
|
|
a numerical ID or a groupname string. If a groupname is specified, this method |
|
|
|
blocks while resolving it to a numerical ID. |
|
|
|
|
|
|
|
if (process.getgid && process.setgid) { |
|
|
|
console.log('Current gid: ' + process.getgid()); |
|
|
|
try { |
|
|
|
process.setgid(501); |
|
|
@ -210,22 +217,30 @@ blocks while resolving it to a numerical ID. |
|
|
|
catch (err) { |
|
|
|
console.log('Failed to set gid: ' + err); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
## process.getuid() |
|
|
|
|
|
|
|
Note: this function is only available on POSIX platforms (i.e. not Windows) |
|
|
|
|
|
|
|
Gets the user identity of the process. (See getuid(2).) |
|
|
|
This is the numerical userid, not the username. |
|
|
|
|
|
|
|
if (process.getuid) { |
|
|
|
console.log('Current uid: ' + process.getuid()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
## process.setuid(id) |
|
|
|
|
|
|
|
Note: this function is only available on POSIX platforms (i.e. not Windows) |
|
|
|
|
|
|
|
Sets the user identity of the process. (See setuid(2).) This accepts either |
|
|
|
a numerical ID or a username string. If a username is specified, this method |
|
|
|
blocks while resolving it to a numerical ID. |
|
|
|
|
|
|
|
if (process.getuid && process.setuid) { |
|
|
|
console.log('Current uid: ' + process.getuid()); |
|
|
|
try { |
|
|
|
process.setuid(501); |
|
|
@ -234,6 +249,7 @@ blocks while resolving it to a numerical ID. |
|
|
|
catch (err) { |
|
|
|
console.log('Failed to set uid: ' + err); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
## process.version |
|
|
|