spawn Questions

3

Solved

I'm spawning a process with child_process.spawn(). How can I view the exact command line that is executed (including all command-line parameters passed into the spawn function)? Here's my example ...
Eer asked 16/10, 2018 at 17:3

2

since a while i am trying to reach something that doesn't work out for me so far. With nodejs, i like to run a interactive sh-command and work with the sh-command output after the command has exit...
Betoken asked 4/9, 2015 at 8:14

11

Solved

I have a script that outputs 'hi', sleeps for a second, outputs 'hi', sleeps for 1 second, and so on and so forth. Now I thought I would be able to tackle this problem with this model. var spawn =...
Paling asked 15/1, 2013 at 7:9

3

Solved

I have a some Python code that occasionally needs to span a new process to run a shell script in a "fire and forget" manner, i.e. without blocking. The shell script will not communicate with the or...
Kilt asked 17/12, 2013 at 23:7

2

I'm trying to run "npm publish" from a gulp task. It works, but I want to handle any error that npm command itself throws. If I execute this code: var cmd = spawnSync('npm.cmd', ['publish', packa...
Thapsus asked 20/10, 2016 at 8:35

31

Solved

When I get the following error: events.js:72 throw er; // Unhandled 'error' event ^ Error: spawn ENOENT at errnoException (child_process.js:1000:11) at Process.ChildProcess._handle.onexit (chi...
Cuirbouilli asked 29/12, 2014 at 12:22

4

I'm using double quotes in Node.js spawn arguments because they can potentially contain spaces: const excludes = ['/foo/bar', '/foo/baz', '/foo/bar baz']; const tar = spawn('tar', [ '--create', '...
Ebullition asked 28/12, 2017 at 22:6

3

Solved

pm2 is killing detached child processes on watch restart (ie which have been spawned with detached:true, stdio:'ignore', and child.unref(). Is there a way of telling pm2 not to kill the tree of ch...
Vachell asked 20/11, 2017 at 14:44

1

Solved

I am not sure if I am doing anything wrong in this code but I am clearly passing a SendPort when spawning a new isolate, however when I call: Infrastructure.instance.initialize(); I get following e...
Shirleneshirley asked 19/1, 2022 at 2:1

9

For learning Angular 2, I am trying their tutorial. I am getting an error like this: (node:4796) UnhandledPromiseRejectionWarning: Unhandled promise rejection (r ejection id: 1): Error: spawn cm...
Mckibben asked 9/11, 2016 at 5:13

1

Solved

I want to create a rust program that feeds in from an external program via pipe and spits to another external program via pipe, like a sandwich. To be more specific, a toy model I'm trying to creat...
Fulton asked 9/7, 2021 at 22:16

2

I am working with Nodejs on Windows 10. Every time the app is opened I want to check if the files with the extension ext are associated to my app. If not I would need to run this commands on cmd in...
Crain asked 31/10, 2018 at 18:48

1

Solved

Does anyone know, in the new Swift async/await stuff, is there any difference between TaskGroup async and spawn, or are they pure synonyms? (If they are synonyms, I rather like spawn better. async ...
Interrogation asked 15/6, 2021 at 4:22

2

I am dealing with a Python script which does, after some preparation work, launch ssh. My script is actually a small CLI tool. On Unix-like systems, at the end of its life, the Python script replac...
Toughen asked 3/5, 2021 at 15:27

6

My Node.js script crashes because of a thrown ENOMEM (Out of memory) errnoException when using spawn. The error: child_process.js:935 throw errnoException(process._errno, 'spawn'); ^ Error: spaw...
Guileless asked 4/10, 2014 at 14:13

1

I get this error when running this block of code, reasoner = new Reasoner({ type: 'local', folder: 'csp_files' }); console.log("solving Model"); reasoner.solve(Model, (err, stdout, std...
Template asked 1/5, 2020 at 10:2

2

Solved

I was reading the description of the two from the python doc: spawn The parent process starts a fresh python interpreter process. The child process will only inherit those resources necessary to r...

4

Solved

Most of the applications we developers write need to be externally parametrized at startup. We pass file paths, pipe names, TCP/IP addresses etc. So far I've been using command line to pass these t...

2

Solved

I created some code to use a python function from a node.js backend. When running it on my ubuntu computer, it works - however! When running the code on his windows machine it gives this stacktrace...
Hebraism asked 6/3, 2019 at 22:50

4

Solved

In an online training video I am watching to learn Node, the narrator says that "spawn is better for longer processes involving large amounts of data, whereas execute is better for short bits of da...
Crosspiece asked 9/2, 2018 at 3:18

5

Solved

Get this error in windows cmd when I try to build (emulate) Cordova app. D:\dev\Cordova\toDoList>cordova build android Running command: D:\dev\Cordova\toDoList\platforms\android\cordova\build....
Linnette asked 20/2, 2015 at 8:38

2

Solved

I am currently writing an application that also starts other applications (e.g. firefox). I want these child applications to outlive the parent (e.g. they should continue to run when the parent exi...
Wilow asked 19/7, 2020 at 8:54

1

Solved

I start a spawn child process this way: let process = spawn(apiPath, { detached: true }) process.unref() process.stdout.on('data', data => { /* do something */ }) When I start the process ...
Jedthus asked 8/1, 2020 at 13:13

3

I want to execute a command like "doSomething ./myfiles/*.csv" with spawn in node.js. I want to use spawn instead of exec, because it is some kind of watch process and I need the stdout output. I...
Daina asked 30/7, 2012 at 7:44

3

Solved

Trying to run windows batch script from node.js v12.6.0 and capture its output in real time and in correct order. But order of stdout and stderr is often (not always, but in 80% cases) mixed during...
Tryst asked 15/7, 2019 at 20:42

© 2022 - 2025 — McMap. All rights reserved.