object Process extends Object with Process

Annotations
@native() @JSGlobal("process")
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Process
  2. Process
  3. IEventEmitter
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def abort(): Unit

    This causes Node.js to emit an abort.

    This causes Node.js to emit an abort. This will cause Node.js to exit and generate a core file.

    Definition Classes
    Process
    Example:
    1. process.abort()

  5. def addListener(eventName: String, listener: Function): Process.this.type

    Alias for emitter.on(eventName, listener).

    Alias for emitter.on(eventName, listener).

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.addListener(eventName, listener)

    See also

    on()

  6. def allowedNodeEnvironmentFlags: EnvironmentFlags
    Definition Classes
    Process
  7. def arch: String

    What processor architecture you're running on: 'arm', 'ia32', or 'x64'.

    What processor architecture you're running on: 'arm', 'ia32', or 'x64'.

    Definition Classes
    Process
    Example:
    1. process.arch

  8. def argv: Array[String]

    An array containing the command line arguments.

    An array containing the command line arguments. The first element will be 'node', the second element will be the name of the JavaScript file. The next elements will be any additional command line arguments.

    Definition Classes
    Process
    Example:
    1. process.argv

  9. def argv0: String
    Definition Classes
    Process
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. def channel: UndefOr[Object]
    Definition Classes
    Process
  12. def chdir(directory: String): Unit

    Changes the current working directory of the process or throws an exception if that fails.

    Changes the current working directory of the process or throws an exception if that fails.

    Definition Classes
    Process
    Example:
    1. process.chdir(directory)

  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. def config: ProcessConfig

    An Object containing the JavaScript representation of the configure options that were used to compile the current Node.js executable.

    An Object containing the JavaScript representation of the configure options that were used to compile the current Node.js executable.

    Definition Classes
    Process
  15. def connected: UndefOr[Boolean]

    If process.connected is false, it is no longer possible to send messages

    If process.connected is false, it is no longer possible to send messages

    Definition Classes
    Process
    Example:
    1. process.connected

  16. def cpuUsage(): CpuUsage
    Definition Classes
    Process
  17. def cpuUsage(previousValue: CpuUsage): CpuUsage
    Definition Classes
    Process
  18. def cwd(): String

    Returns the current working directory of the process.

    Returns the current working directory of the process.

    Definition Classes
    Process
    Example:
    1. process.cwd()

  19. def debugPort: Integer

    Returns the debug port

    Returns the debug port

    Definition Classes
    Process
  20. def disconnect(): Any

    Close the IPC channel to the parent process, allowing this child to exit gracefully once there are no other connections keeping it alive.

    Close the IPC channel to the parent process, allowing this child to exit gracefully once there are no other connections keeping it alive.

    Identical to the parent process's ChildProcess.disconnect(). If Node.js was not spawned with an IPC channel, process.disconnect() will be undefined.

    Definition Classes
    Process
    Example:
    1. process.disconnect()

  21. def dlopen(module: Module, filename: String): Unit
    Definition Classes
    Process
  22. def dlopen(module: Module, filename: String, flags: Int): Unit
    Definition Classes
    Process
  23. val domain: Domain
    Definition Classes
    IEventEmitter
  24. def emit(name: String, args: Any*): Boolean

    Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.

    Returns true if the event had listeners, false otherwise.

    name

    the event name

    args

    the event arguments

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.emit(name[, arg1][, arg2][, ...])

  25. def emitWarning(warning: String): Unit
    Definition Classes
    Process
  26. def emitWarning(warning: String, type: String): Unit
    Definition Classes
    Process
  27. def emitWarning(warning: String, type: String, code: String): Unit
    Definition Classes
    Process
  28. def emitWarning(warning: String, ctor: Function): Unit
    Definition Classes
    Process
  29. def emitWarning(warning: String, type: String, ctor: Function): Unit
    Definition Classes
    Process
  30. def emitWarning(warning: String, type: String, code: String, ctor: Function): Unit
    Definition Classes
    Process
  31. def emitWarning(warning: String, options: WarningOptions): Unit
    Definition Classes
    Process
  32. def emitWarning(warning: Error): Unit
    Definition Classes
    Process
  33. def emitWarning(warning: Error, options: WarningOptions): Unit
    Definition Classes
    Process
  34. def env: Environment

    An object containing the user environment.

    An object containing the user environment.

    Definition Classes
    Process
  35. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  36. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  37. def eventNames(): Array[String]
    Definition Classes
    IEventEmitter
  38. def execArgv: Array[String]

    This is the set of Node.js-specific command line options from the executable that started the process.

    This is the set of Node.js-specific command line options from the executable that started the process. These options do not show up in process.argv, and do not include the Node.js executable, the name of the script, or any options following the script name. These options are useful in order to spawn child processes with the same execution environment as the parent.

    Definition Classes
    Process
    Since

    0.7.7

  39. def execPath: String

    This is the absolute pathname of the executable that started the process.

    This is the absolute pathname of the executable that started the process.

    Definition Classes
    Process
    Example:
    1. process.execPath

  40. def exit(): Unit
    Definition Classes
    Process
  41. def exit(code: Int): Unit

    Ends the process with the specified code.

    Ends the process with the specified code. If omitted, exit uses the 'success' code 0.

    Definition Classes
    Process
    Example:
    1. process.exit([code])

  42. def exitCode: Int

    A number which will be the process exit code, when the process either exits gracefully, or is exited via process.exit() without specifying a code.

    A number which will be the process exit code, when the process either exits gracefully, or is exited via process.exit() without specifying a code.

    Specifying a code to process.exit(code) will override any previous setting of process.exitCode.

    Definition Classes
    Process
    Example:
    1. process.exitCode

  43. def features: Features
    Definition Classes
    Process
  44. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  45. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  46. def getMaxListeners(): Int

    Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter.defaultMaxListeners.

    Returns the current max listener value for the EventEmitter which is either set by emitter.setMaxListeners(n) or defaults to EventEmitter.defaultMaxListeners.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.getMaxListeners()

    See also

    setMaxListeners()

  47. def getegid(): Int

    Gets the effective group identity of the process.

    Gets the effective group identity of the process. This is the numerical group id, not the group name.

    Note: this function is only available on POSIX platforms (i.e. not Windows, Android)

    Definition Classes
    Process
    Example:
    1. process.getegid()

  48. def geteuid(): Int

    Gets the effective user identity of the process.

    Gets the effective user identity of the process. This is the numerical userid, not the username.

    Note: this function is only available on POSIX platforms (i.e. not Windows, Android)

    Definition Classes
    Process
    Example:
    1. process.geteuid()

  49. def getgid(): Int

    Gets the group identity of the process.

    Gets the group identity of the process. This is the numerical group id, not the group name.

    Note: this function is only available on POSIX platforms (i.e. not Windows, Android)

    Definition Classes
    Process
    Example:
    1. process.getgid()

  50. def getgroups(): Array[Int]

    Returns an array with the supplementary group IDs.

    Returns an array with the supplementary group IDs. POSIX leaves it unspecified if the effective group ID is included but Node.js ensures it always is.

    Definition Classes
    Process
    Example:
    1. process.getgroups()

  51. def getuid(): Int

    Gets the user identity of the process.

    Gets the user identity of the process. (See getuid(2).) This is the numerical userid, not the username.

    Note: this function is only available on POSIX platforms (i.e. not Windows, Android)

    Definition Classes
    Process
    Example:
    1. process.getuid()

  52. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  53. def hasUncaughtExceptionCaptureCallback(): Boolean
    Definition Classes
    Process
  54. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  55. val hrtime: HrTime

    Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array.

    Returns the current high-resolution real time in a [seconds, nanoseconds] tuple Array. It is relative to an arbitrary time in the past. It is not related to the time of day and therefore not subject to clock drift. The primary use is for measuring performance between intervals.

    Definition Classes
    Process
    Example:
    1. process.hrtime([time])

  56. def initgroups(user: Int, extra_group: Int): Array[Int]
    Definition Classes
    Process
  57. def initgroups(user: Int, extra_group: String): Array[Int]
    Definition Classes
    Process
  58. def initgroups(user: String, extra_group: Int): Array[Int]
    Definition Classes
    Process
  59. def initgroups(user: String, extra_group: String): Array[Int]

    Reads /etc/group and initializes the group access list, using all groups of which the user is a member.

    Reads /etc/group and initializes the group access list, using all groups of which the user is a member. This is a privileged operation, meaning you need to be root or have the CAP_SETGID capability.

    Definition Classes
    Process
    Example:
    1. process.initgroups(user, extra_group)

  60. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  61. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  62. def kill(pid: Int): Unit
    Definition Classes
    Process
  63. def kill(pid: Int, signal: Int): Unit
    Definition Classes
    Process
  64. def kill(pid: Int, signal: String): Unit

    Send a signal to a process.

    Send a signal to a process. pid is the process id and signal is the string describing the signal to send. Signal names are strings like SIGINT or SIGHUP. If omitted, the signal will be SIGTERM. See Signal Events and kill(2) for more information.

    Will throw an error if target does not exist, and as a special case, a signal of 0 can be used to test for the existence of a process. Windows platforms will throw an error if the pid is used to kill a process group.

    Note that even though the name of this function is process.kill, it is really just a signal sender, like the kill system call. The signal sent may do something other than kill the target process.

    Definition Classes
    Process
    Example:
    1. process.kill(pid[, signal])

  65. def listenerCount(eventName: String): Int

    Returns the number of listeners listening to the event named eventName.

    Returns the number of listeners listening to the event named eventName.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.listenerCount(eventName)

  66. def listeners(eventName: String): Array[Function]

    Returns a copy of the array of listeners for the event named eventName.

    Returns a copy of the array of listeners for the event named eventName.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.listeners(eventName)

  67. def mainModule: UndefOr[Any]

    Alternate way to retrieve require.main.

    Alternate way to retrieve require.main. The difference is that if the main module changes at runtime, require.main might still refer to the original main module in modules that were required before the change occurred. Generally it's safe to assume that the two refer to the same module.

    As with require.main, it will be undefined if there was no entry script.

    Definition Classes
    Process
  68. def memoryUsage(): MemoryUsage

    Returns an object describing the memory usage of the Node.js process measured in bytes.

    Returns an object describing the memory usage of the Node.js process measured in bytes.

    Definition Classes
    Process
    Example:
    1. process.memoryUsage()

  69. def moduleLoadList: Array[String]

    Returns the loaded module list

    Returns the loaded module list

    Definition Classes
    Process
  70. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  71. def nextTick(callback: Function0[Any], args: Any*): Unit

    Once the current event loop turn runs to completion, call the callback function.

    Once the current event loop turn runs to completion, call the callback function.

    This is not a simple alias to setTimeout(fn, 0), it's much more efficient. It runs before any additional I/O events (including timers) fire in subsequent ticks of the event loop.

    Definition Classes
    Process
    Example:
    1. process.nextTick(callback[, arg][, ...])

  72. def noDeprecation: UndefOr[Boolean]
    Definition Classes
    Process
  73. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  74. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  75. def off(eventName: String, listner: Function): Process.this.type
    Definition Classes
    IEventEmitter
  76. def on(eventName: String, listener: Function): Process.this.type

    Adds the listener function to the end of the listeners array for the event named eventName.

    Adds the listener function to the end of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Returns a reference to the EventEmitter so calls can be chained.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.on(eventName, listener)

  77. def once(eventName: String, listener: Function): Process.this.type

    Adds a one time listener function for the event named eventName.

    Adds a one time listener function for the event named eventName. This listener is invoked only the next time eventName is triggered, after which it is removed.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.once(eventName, listener)

  78. def pid: Int

    The PID of the process.

    The PID of the process.

    Definition Classes
    Process
    Example:
    1. process.pid

  79. def platform: String

    What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'

    What platform you're running on: 'darwin', 'freebsd', 'linux', 'sunos' or 'win32'

    Definition Classes
    Process
  80. def ppid: Int
    Definition Classes
    Process
  81. def prependListener(eventName: String, listener: Function): Process.this.type
    Definition Classes
    IEventEmitter
  82. def prependOnceListener(eventName: String, listener: Function): Process.this.type
    Definition Classes
    IEventEmitter
  83. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  84. def rawListeners(eventName: String): Array[Function]
    Definition Classes
    IEventEmitter
  85. def release: ReleaseInfo

    An Object containing metadata related to the current release, including URLs for the source tarball and headers-only tarball.

    An Object containing metadata related to the current release, including URLs for the source tarball and headers-only tarball.

    Definition Classes
    Process
    Since

    3.0.0

  86. def removeAllListeners(): Process.this.type
    Definition Classes
    IEventEmitter
  87. def removeAllListeners(eventName: String): Process.this.type

    Removes all listeners, or those of the specified eventName.

    Removes all listeners, or those of the specified eventName.

    Note that it is bad practice to remove listeners added elsewhere in the code, particularly when the EventEmitter instance was created by some other component or module (e.g. sockets or file streams).

    Returns a reference to the EventEmitter so calls can be chained.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.removeAllListeners([eventName])

  88. def removeListener(eventName: String, listener: Function): Process.this.type

    Removes the specified listener from the listener array for the event named eventName.

    Removes the specified listener from the listener array for the event named eventName. removeListener will remove, at most, one instance of a listener from the listener array. If any single listener has been added multiple times to the listener array for the specified eventName, then removeListener must be called multiple times to remove each instance.

    Note that once an event has been emitted, all listeners attached to it at the time of emitting will be called in order. This implies that any removeListener() or removeAllListeners() calls after emitting and before the last listener finishes execution will not remove them from emit() in progress. Subsequent events will behave as expected.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.removeListener(eventName, listener)

  89. def report: UndefOr[Reporter]
    Definition Classes
    Process
  90. def resourceUsage(): ResourceUsage
    Definition Classes
    Process
  91. def send(message: Any): Boolean
    Definition Classes
    Process
  92. def send(message: Any, callback: Function): Boolean
    Definition Classes
    Process
  93. def send(message: Any, sendHandle: SendHandle): Boolean
    Definition Classes
    Process
  94. def send(message: Any, sendHandle: SendHandle, callback: Function): Boolean
    Definition Classes
    Process
  95. def send(message: Any, sendHandle: SendHandle, options: TransferOptions): Boolean
    Definition Classes
    Process
  96. def send(message: Any, sendHandle: SendHandle, options: TransferOptions, callback: Function): Boolean

    When Node.js is spawned with an IPC channel attached, it can send messages to its parent process using process.send().

    When Node.js is spawned with an IPC channel attached, it can send messages to its parent process using process.send(). Each will be received as a 'message' event on the parent's ChildProcess object.

    Note: this function uses JSON.stringify() internally to serialize the message. If Node.js was not spawned with an IPC channel, process.send() will be undefined.

    Definition Classes
    Process
    Example:
    1. process.send(message[, sendHandle[, options]][, callback])
    Since

    0.5.9

  97. def setMaxListeners(n: Int): Process.this.type

    By default EventEmitters will print a warning if more than 10 listeners are added for a particular event.

    By default EventEmitters will print a warning if more than 10 listeners are added for a particular event. This is a useful default that helps finding memory leaks. Obviously, not all events should be limited to just 10 listeners. The emitter.setMaxListeners() method allows the limit to be modified for this specific EventEmitter instance. The value can be set to Infinity (or 0) for to indicate an unlimited number of listeners.

    Returns a reference to the EventEmitter so calls can be chained.

    Definition Classes
    IEventEmitter
    Example:
    1. emitter.setMaxListeners(n)

  98. def setUncaughtExceptionCaptureCallback(): Unit
    Definition Classes
    Process
  99. def setUncaughtExceptionCaptureCallback(callback: Function): Unit
    Definition Classes
    Process
  100. def setegid(id: Int): Unit
    Definition Classes
    Process
  101. def setegid(id: String): Unit

    Sets the effective group identity of the process.

    Sets the effective group identity of the process. 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.

    Definition Classes
    Process
    Example:
    1. process.setegid(id)

    Since

    2.0.0

  102. def seteuid(id: Int): Unit
    Definition Classes
    Process
  103. def seteuid(id: String): Unit

    Sets the effective user identity of the process.

    Sets the effective user identity of the process. 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.

    Definition Classes
    Process
    Example:
    1. process.seteuid(id)

  104. def setgid(id: Int): Unit
    Definition Classes
    Process
  105. def setgid(id: String): Unit

    Sets the group identity of the process.

    Sets the group identity of the process. 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.

    Definition Classes
    Process
    Example:
    1. process.setgid(id)

  106. def setgroups(groups: Array[Int]): Unit

    Sets the supplementary group IDs.

    Sets the supplementary group IDs. This is a privileged operation, meaning you need to be root or have the CAP_SETGID capability. The list can contain group IDs, group names or both.

    Definition Classes
    Process
    Example:
    1. process.setgroups(groups)

  107. def setuid(id: Int): Unit
    Definition Classes
    Process
  108. def setuid(id: String): Unit

    Sets the user identity of the process.

    Sets the user identity of the process. 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.

    Definition Classes
    Process
    Example:
    1. process.setuid(id)

  109. def stderr: WriteStream

    process.stderr and process.stdout are unlike other streams in Node.js in that they cannot be closed (end() will throw), they never emit the finish event and that writes can block when output is redirected to a file (although disks are fast and operating systems normally employ write-back caching so it should be a very rare occurrence indeed.)

    process.stderr and process.stdout are unlike other streams in Node.js in that they cannot be closed (end() will throw), they never emit the finish event and that writes can block when output is redirected to a file (although disks are fast and operating systems normally employ write-back caching so it should be a very rare occurrence indeed.)

    Definition Classes
    Process
  110. def stdin: ReadStream

    A Readable Stream for stdin (on fd 0).

    A Readable Stream for stdin (on fd 0).

    Definition Classes
    Process
  111. def stdout: WriteStream

    process.stderr and process.stdout are unlike other streams in Node.js in that they cannot be closed (end() will throw), they never emit the finish event and that writes can block when output is redirected to a file (although disks are fast and operating systems normally employ write-back caching so it should be a very rare occurrence indeed.)

    process.stderr and process.stdout are unlike other streams in Node.js in that they cannot be closed (end() will throw), they never emit the finish event and that writes can block when output is redirected to a file (although disks are fast and operating systems normally employ write-back caching so it should be a very rare occurrence indeed.)

    Definition Classes
    Process
  112. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  113. def throwDeprecation: UndefOr[Boolean]
    Definition Classes
    Process
  114. val title: String

    Getter/setter to set what is displayed in ps.

    Getter/setter to set what is displayed in ps. When used as a setter, the maximum length is platform-specific and probably short. On Linux and OS X, it's limited to the size of the binary name plus the length of the command line arguments because it overwrites the argv memory. v0.8 allowed for longer process title strings by also overwriting the environ memory but that was potentially insecure/confusing in some (rather obscure) cases.

    Definition Classes
    Process
  115. def toLocaleString(): String
    Definition Classes
    Object
  116. def toString(): String
    Definition Classes
    AnyRef → Any
  117. def traceDeprecation: UndefOr[Boolean]
    Definition Classes
    Process
  118. def umask(mask: Int): Int

    Sets or reads the process's file mode creation mask.

    Sets or reads the process's file mode creation mask. Child processes inherit the mask from the parent process. Returns the old mask if mask argument is given, otherwise returns the current mask.

    Definition Classes
    Process
    Example:
    1. process.umask([mask])

  119. def uptime(): Int

    Number of seconds Node.js has been running.

    Number of seconds Node.js has been running.

    Definition Classes
    Process
    Example:
    1. process.uptime()

  120. def valueOf(): Any
    Definition Classes
    Object
  121. def version: String

    A compiled-in property that exposes NODE_VERSION.

    A compiled-in property that exposes NODE_VERSION.

    Definition Classes
    Process
  122. def versions: ComponentVersion

    A property exposing version strings of Node.js and its dependencies.

    A property exposing version strings of Node.js and its dependencies.

    Definition Classes
    Process
  123. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  124. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  125. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def umask(): Int

    Sets or reads the process's file mode creation mask.

    Sets or reads the process's file mode creation mask. Child processes inherit the mask from the parent process. Returns the old mask if mask argument is given, otherwise returns the current mask.

    Definition Classes
    Process
    Annotations
    @deprecated
    Deprecated

    (Since version Node.js v12.19.0) DEP0139: Use umask(mask) instead.

    Example:
    1. process.umask([mask])

Inherited from Process

Inherited from IEventEmitter

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped