Function
Static Public Summary | ||
public |
findActualExecutable(exe: string, args: Array<string>): Object Finds the actual executable and parameters to run on Windows. |
|
public |
Spawns a process attached as a child of the current process. |
|
public |
Spawns a process but detached from the current process. |
|
public |
Spawns a process but detached from the current process. |
|
public |
Spawns a process as a child process. |
Static Public
public findActualExecutable(exe: string, args: Array<string>): Object source
import {findActualExecutable} from 'spawn-rx/src/index.js'
Finds the actual executable and parameters to run on Windows. This method mimics the POSIX behavior of being able to run scripts as executables by replacing the passed-in executable with the script runner, for PowerShell, CMD, and node scripts.
This method also does the work of running down PATH, which spawn on Windows also doesn't do, unlike on POSIX.
public spawn(exe: string, params: Array<string>, opts: Object): Observable<string> source
import {spawn} from 'spawn-rx/src/index.js'
Spawns a process attached as a child of the current process.
Return:
Observable<string> | Returns an Observable that when subscribed to, will create a child process. The process output will be streamed to this Observable, and if unsubscribed from, the process will be terminated early. If the process terminates with a non-zero value, the Observable will terminate with onError. |
public spawnDetached(exe: string, params: Array<string>, opts: Object): Observable<string> source
import {spawnDetached} from 'spawn-rx/src/index.js'
Spawns a process but detached from the current process. The process is put into its own Process Group that can be killed by unsubscribing from the return Observable.
Return:
Observable<string> | Returns an Observable that when subscribed to, will create a detached process. The process output will be streamed to this Observable, and if unsubscribed from, the process will be terminated early. If the process terminates with a non-zero value, the Observable will terminate with onError. |
public spawnDetachedPromise(exe: string, params: Array<string>, opts: Object): Promise<string> source
import {spawnDetachedPromise} from 'spawn-rx/src/index.js'
Spawns a process but detached from the current process. The process is put into its own Process Group.