child-process Questions

3

Solved

I am using spawn to spawn a long running process that sends output over time to stdio, and is read and processed by my nodejs script. The tricky part is that I cannot guarantee that the command sen...
Becalmed asked 10/12, 2015 at 17:54

2

Solved

My query: In the following code i had tried to bring the print $commandoutput[0] to be shifted or passed into the upcoming subroutine.i tried the shift to pass it.But i failed with it.Can you plea...
Erlking asked 27/1, 2017 at 9:47

1

Solved

I want to connect a computer by the full computer name on Remote Desktop Connection. In nodejs, i create a child process to execute a cmd command.It executed successfully,but after two minutes, it ...
Philippi asked 8/6, 2015 at 8:59

1

Solved

TL;DR : How does one fork a process that is located outside of the current running process? I'm trying to use child_process of Nodejs in order to start another nodejs process on the parent's proce...
Santos asked 18/12, 2016 at 15:31

1

Solved

I would like to start a child process in NodeJS and save it's output into a variable. The following code gives it to stdout: require("child_process").execSync("echo Hello World", {"stdio": "inheri...

3

Solved

When we call : var p = require(child_process); Are we already creating a child process ? (if not, what is the p here?) To explain my confusion futher, in a codebase i picked up, i see : var ...
Burnoose asked 29/12, 2014 at 13:43

2

Solved

When spawning child processes via spawn()/exec()/... in Node.js, there is a 'close' and an 'exit' event on child processes. What is the difference between those two and when do you need to use wha...
Magnus asked 30/5, 2016 at 9:20

2

I am using Node.js to spawn upwards of 100 child processes, maybe even 1000. What concerns me is that the parent process could become some sort of bottleneck if all the stdout/stderr of the child p...
Insipience asked 26/11, 2016 at 9:16

1

I'm trying to capture standard output from a spawned child_process in Node.js (0.10.29). Right now I'm just trying with ping. The following code doesn't print (but does ping) var exec = require('ch...
Aureole asked 8/7, 2014 at 13:17

3

I'm trying to send a huge json string from a child process to the parent process. My initial approach was the following: child: process.stdout.write(myHugeJsonString); parent: child.stdout.on('da...
Bearable asked 27/6, 2014 at 11:3

1

Solved

I'm running nodejs on a raspberry pi and I want to run a child process to spawn a webcam stream. Outside of node my command is: raspivid -n -mm matrix -w 320 -h 240 -fps 18 -g 100 -t 0 -b 5000000...
Gilolo asked 10/3, 2015 at 16:11

1

Solved

Is it possible to call CLI tools like pdftotext, antiword, catdoc (text extractor scripts) passing a string instead of a file? Currently, I read PDF files calling pdftotext with child_process.spaw...
Crepuscular asked 22/7, 2016 at 19:9

1

use Parallel::ForkManager; my $number_running = 0; my $pm = new Parallel::ForkManager(30); $pm->run_on_start( sub { ++$number_running; } ); $pm->run_on_finish( sub { --$number_running;...
Viewfinder asked 22/8, 2016 at 4:9

3

I am writing a bash script in which I wrote a handler to take care of when the user pressed Control+C, (by using trap interruptHandler SIGINT) but the SIGINT gets sent to both the bash script and t...
Gernhard asked 6/8, 2016 at 2:52

1

I have an http server and a forked child process. I want the parent to receive requests and pass to forked process using worker.send. and the worker should be able to process and send the response ...
Hegelianism asked 16/7, 2013 at 11:17

0

My Electron app launches R scripts with the child_process module. In development, no problem. When the application is built (using electron-packager), the R scripts are not found. In the app folde...
Authoritarian asked 3/7, 2016 at 7:15

1

Solved

I'm writing a command line utility, and I need stdout to write to TTY or use {stdio: 'inherit'} I've been getting by with exec but it's not going to cut it. I need way for a spawn process to execut...
Aqueduct asked 27/6, 2016 at 3:11

1

EDIT 2 I "solved" the problem, but I don't want to post it as an answer b/c it doesn't explain what actually happened. In the code for the .NET resourceReader.exe I use Console.OutputEncoding = S...
Slavery asked 3/5, 2016 at 9:45

1

Solved

I just practise some node js code about child_process @the link My node version is V5.2.0 on windows 7. // master.js var cp=require("child_process"); var np=cp.fork("./console.js"); // line B /...
Hild asked 10/5, 2016 at 12:5

3

I'm trying this out: var child = spawn('node', args, {cwd: parentDir, stdio: 'ipc'} ); (args is an array of parameters) but it gives the following error: TypeError: Incorrect value of stdio...
Roede asked 24/1, 2014 at 22:5

1

Solved

While writting unit tests for a simple tool, I was unable to get the process exit code of a child process started with require('child_process').spawn. To simplify if down, consider this simple node...
Exurbia asked 30/4, 2016 at 20:57

3

Solved

I'm trying to spawn a synchronous child process (to run ffprobe) in AWS Lambda function, but it dies almost instantly (200ms) with signal SIGSEGV. My understanding of a segmentation fault is that...
Camarillo asked 20/4, 2016 at 16:35

1

I want to include shelljs library to angular 2 typescript. I have included the shelljs.d.ts file to my node_modules/shelljs library. My package.json "name": "myproj1", "description": "myproj1: A...
Monomer asked 28/4, 2016 at 11:45

1

Solved

First of all, I'm a complete noob and started using Node.JS yesterday (it was also my first time using Linux in years) so please be nice and explicit I'm currently making a Node.JS program which h...
Dov asked 29/4, 2016 at 9:34

1

Solved

I have a node.js application that receives a file, via a web request and then will apply a conversion process to this file. Since the task is long running this needs to run separate to the main thr...
Beamon asked 25/4, 2016 at 20:38

© 2022 - 2024 — McMap. All rights reserved.