time-to-botec/js/node_modules/@stdlib/process/geteuid/README.md
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

1.6 KiB

geteuid

Return the effective numeric user identity of the calling process.

Usage

var geteuid = require( '@stdlib/process/geteuid' );

geteuid()

Returns the effective numeric user identity of the calling process.

var id = geteuid();

Notes

  • The function only returns an integer user identity on POSIX platforms. For all other platforms (e.g., Windows, browsers, and Android), the function returns null.
  • See geteuid(2).

Examples

var geteuid = require( '@stdlib/process/geteuid' );

var uid = geteuid();
if ( uid === 0 ) {
    console.log( 'Effectively running as root.' );
} else {
    console.log( 'uid: %d', uid );
}