Process

@native @JSType trait Process extends StObject with EventEmitter
trait StObject
class Object
trait Any
class Object
trait Matchable
class Any

Value members

Concrete methods

def abort(): Nothing
def addListener(event: Signals, listener: SignalsListener): Process
@JSName("addListener")
@JSName("addListener")
@JSName("addListener")
def addListener_exit(event: exit, listener: ExitListener): Process
@JSName("addListener")
@JSName("addListener")
@JSName("addListener")
@JSName("addListener")
@JSName("addListener")
@JSName("addListener")
def chdir(directory: String): Unit
def cpuUsage(previousValue: CpuUsage): CpuUsage
def cwd(): String
def disconnect(): Unit
def emit(event: Signals, signal: Signals): Boolean
def emitWarning(warning: String): Unit

The process.emitWarning() method can be used to emit custom or application specific process warnings.

The process.emitWarning() method can be used to emit custom or application specific process warnings.

These can be listened for by adding a handler to the 'warning' event.

Value Params
code

A unique identifier for the warning instance being emitted.

ctor

When warning is a string, ctor is an optional function used to limit the generated stack trace. Default: process.emitWarning.

type

When warning is a string, type is the name to use for the type of warning being emitted. Default: 'Warning'.

warning

The warning to emit.

def emitWarning(warning: String, ctor: Function): Unit
def emitWarning(warning: String, options: EmitWarningOptions): Unit
def emitWarning(warning: String, `type`: String): Unit
def emitWarning(warning: String, `type`: String, code: String): Unit
def emitWarning(warning: String, `type`: String, code: String, ctor: Function): Unit
def emitWarning(warning: String, `type`: String, code: Unit, ctor: Function): Unit
def emitWarning(warning: String, `type`: String, ctor: Function): Unit
def emitWarning(warning: String, `type`: Unit, code: String): Unit
def emitWarning(warning: String, `type`: Unit, code: String, ctor: Function): Unit
def emitWarning(warning: String, `type`: Unit, code: Unit, ctor: Function): Unit
def emitWarning(warning: String, `type`: Unit, ctor: Function): Unit
def emitWarning(warning: Error): Unit
def emitWarning(warning: Error, ctor: Function): Unit
def emitWarning(warning: Error, options: EmitWarningOptions): Unit
def emitWarning(warning: Error, `type`: String): Unit
def emitWarning(warning: Error, `type`: String, code: String): Unit
def emitWarning(warning: Error, `type`: String, code: String, ctor: Function): Unit
def emitWarning(warning: Error, `type`: String, code: Unit, ctor: Function): Unit
def emitWarning(warning: Error, `type`: String, ctor: Function): Unit
def emitWarning(warning: Error, `type`: Unit, code: String): Unit
def emitWarning(warning: Error, `type`: Unit, code: String, ctor: Function): Unit
def emitWarning(warning: Error, `type`: Unit, code: Unit, ctor: Function): Unit
def emitWarning(warning: Error, `type`: Unit, ctor: Function): Unit
@JSName("emit")
def emit_beforeExit(event: beforeExit, code: Double): Boolean
@JSName("emit")
def emit_disconnect(event: disconnect): Boolean
@JSName("emit")
def emit_exit(event: exit, code: Double): Boolean
@JSName("emit")
def emit_message(event: message, message: Any, sendHandle: Any): Process
@JSName("emit")
def emit_newListener(event: newListener, eventName: String, listener: Function1[Any, Unit]): Process
@JSName("emit")
def emit_newListener(event: newListener, eventName: Symbol, listener: Function1[Any, Unit]): Process
@JSName("emit")
def emit_rejectionHandled(event: rejectionHandled, promise: Promise[Any]): Boolean
@JSName("emit")
def emit_removeListener(event: removeListener, eventName: String, listener: Function1[Any, Unit]): Process
@JSName("emit")
def emit_uncaughtException(event: uncaughtException, error: Error): Boolean
@JSName("emit")
def emit_uncaughtExceptionMonitor(event: uncaughtExceptionMonitor, error: Error): Boolean
@JSName("emit")
def emit_unhandledRejection(event: unhandledRejection, reason: Any, promise: Promise[Any]): Boolean
@JSName("emit")
def emit_warning(event: warning, warning: Error): Boolean
def exit(): Nothing
def exit(code: Double): Nothing
def getegid(): Double
def geteuid(): Double
def getgid(): Double
def getgroups(): Array[Double]
def getuid(): Double
def hrtime(): Tuple2[Double, Double]
def hrtime(time: Tuple2[Double, Double]): Tuple2[Double, Double]
def kill(pid: Double): `true`
def kill(pid: Double, signal: String): `true`
def kill(pid: Double, signal: Double): `true`
def listeners(event: Signals): Array[SignalsListener]
@JSName("listeners")
@JSName("listeners")
@JSName("listeners")
def listeners_exit(event: exit): Array[ExitListener]
@JSName("listeners")
@JSName("listeners")
@JSName("listeners")
@JSName("listeners")

The process.memoryUsage() method iterate over each page to gather informations about memory usage which can be slow depending on the program memory allocations.

The process.memoryUsage() method iterate over each page to gather informations about memory usage which can be slow depending on the program memory allocations.

def nextTick(callback: Function, args: Any*): Unit
def on(event: Signals, listener: SignalsListener): Process
@JSName("on")
@JSName("on")
@JSName("on")
def on_exit(event: exit, listener: ExitListener): Process
@JSName("on")
def on_message(event: message, listener: MessageListener): Process
@JSName("on")
@JSName("on")
@JSName("on")
def on_warning(event: warning, listener: WarningListener): Process
def once(event: Signals, listener: SignalsListener): Process
@JSName("once")
@JSName("once")
@JSName("once")
def once_exit(event: exit, listener: ExitListener): Process
@JSName("once")
def once_message(event: message, listener: MessageListener): Process
@JSName("once")
@JSName("once")
@JSName("once")
def once_warning(event: warning, listener: WarningListener): Process
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
@JSName("prependOnceListener")
def setUncaughtExceptionCaptureCallback(cb: Function1[Error, Unit]): Unit
def setegid(id: String): Unit
def setegid(id: Double): Unit
def seteuid(id: String): Unit
def seteuid(id: Double): Unit
def setgid(id: String): Unit
def setgid(id: Double): Unit
def setgroups(groups: Array[String | Double]): Unit
def setuid(id: String): Unit
def setuid(id: Double): Unit
def umask(): Double
def umask(mask: String): Double

Can only be set if not in worker thread.

Can only be set if not in worker thread.

def umask(mask: Double): Double
def uptime(): Double

Inherited methods

def addListener(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def addListener(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def emit(event: Symbol, args: Any*): Boolean
Inherited from
EventEmitter
def emit(event: String, args: Any*): Boolean
Inherited from
EventEmitter
def eventNames(): Array[String | Symbol]
Inherited from
EventEmitter
def getMaxListeners(): Double
Inherited from
EventEmitter
def hasOwnProperty(v: String): Boolean
Inherited from
Object
def isPrototypeOf(v: Object): Boolean
Inherited from
Object
def listenerCount(event: Symbol): Double
Inherited from
EventEmitter
def listenerCount(event: String): Double
Inherited from
EventEmitter
def listeners(event: Symbol): Array[Function]
Inherited from
EventEmitter
def listeners(event: String): Array[Function]
Inherited from
EventEmitter
def off(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def off(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def on(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def on(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def once(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def once(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def prependListener(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def prependListener(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def prependOnceListener(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def prependOnceListener(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def propertyIsEnumerable(v: String): Boolean
Inherited from
Object
def rawListeners(event: Symbol): Array[Function]
Inherited from
EventEmitter
def rawListeners(event: String): Array[Function]
Inherited from
EventEmitter
def removeAllListeners(event: Symbol): Process
Inherited from
EventEmitter
def removeAllListeners(event: String): Process
Inherited from
EventEmitter
def removeListener(event: Symbol, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def removeListener(event: String, listener: Function1[Any, Unit]): Process
Inherited from
EventEmitter
def setMaxListeners(n: Double): Process
Inherited from
EventEmitter
def toLocaleString(): String
Inherited from
Object
def valueOf(): Any
Inherited from
Object

Concrete fields

The process.allowedNodeEnvironmentFlags property is a special, read-only Set of flags allowable within the NODE_OPTIONS environment variable.

The process.allowedNodeEnvironmentFlags property is a special, read-only Set of flags allowable within the NODE_OPTIONS environment variable.

val arch: String
var argv: Array[String]
var argv0: String
var connected: Boolean
var debugPort: Double
var execArgv: Array[String]
var execPath: String
var exitCode: UndefOr[Double]
@JSName("hrtime")
var mainModule: UndefOr[Module]
@JSName("memoryUsage")
val pid: Double
val ppid: Double
var report: UndefOr[ProcessReport]

Only available with --experimental-report

Only available with --experimental-report

var send: UndefOr[Function4[Any, UndefOr[Any], UndefOr[SwallowErrors], UndefOr[Function1[Error | Null, Unit]], Boolean]]

Can also be a tty.WriteStream, not typed due to limitations.

Can also be a tty.WriteStream, not typed due to limitations.

Can also be a tty.WriteStream, not typed due to limitations.

Can also be a tty.WriteStream, not typed due to limitations.

var title: String
var traceDeprecation: Boolean
val version: String