mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-05-15 07:34:46 +00:00
Upload of pre-existing files
This commit is contained in:
commit
4c21152830
150 changed files with 730703 additions and 0 deletions
22
Node.js/Standard Packages/child_process.md
Normal file
22
Node.js/Standard Packages/child_process.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Child Process Module
|
||||
|
||||
## Spawning
|
||||
|
||||
```js
|
||||
child_process.spawn(command, args, options); // spawn a child process
|
||||
|
||||
// On Windows, setting options.detached to true makes it possible for the child process to continue running after the parent exits
|
||||
child_process.spawn(command, args, {
|
||||
detached: true
|
||||
});
|
||||
```
|
||||
|
||||
## Using The System Shell
|
||||
|
||||
```js
|
||||
exec("command args", {'shell':'powershell.exe'}, (err, stdout, stderr) => {
|
||||
|
||||
});
|
||||
|
||||
execSync("command args", {'shell':'powershell.exe'});
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue