child-process Questions

1

Solved

When I package an electron app using electron-packager. The app spawns a child process which uses a 'node' command. Now if I try to launch my app in a system with no node installed on it, does the ...
Receptacle asked 9/8, 2018 at 16:15

2

Solved

I have my packaged electron app using electron-packager and I want to run this app in any mac which doesn't have node installed. I was suggested that electron-packager bundles the node into m...

1

The following code run fine on JPEG, Docx, zip and several other file formats. Then I try is on mpg-filer however, I am hit by a "Error: write EPIPE" that I am unable to debug. Using a try/catch co...
Lyndseylyndsie asked 14/8, 2018 at 10:28

1

Solved

I'm trying to run a shell command inside of a gulp task using child_process.spawn. I have to detect when the task is done running so I'm using stdout to check for a specific string that I emit at ...
Malnutrition asked 6/8, 2018 at 21:23

2

Solved

I'm testing the plus_one app, and while running it, I just wanted to clarify my concepts on event.once() and event.on() This is plus_one.js > process.stdin.resume(); process.stdin.on('data',fu...
Plantaineater asked 11/9, 2013 at 11:38

1

Solved

I have the following script which executes a shell command: #!/usr/bin/env node const { execSync } = require('child_process'); try { const data = execSync( 'yarn licenses generate-disclaimer -...
Marjoram asked 18/10, 2017 at 20:18

1

Solved

I'm using Node's childProcess module to try and run NPM tasks. When I do the following, everything works file: const child = childProcess.spawn('npm', ['run', taskName], { cwd: `${parentPath}/$...
Beker asked 2/6, 2018 at 22:32

3

I know there is a api process.memoryUsage() to get memory usage in current process. But if I start a new child process by child_process.spawn(command, [args], [options]) and I get a ChildProcess o...
Brilliant asked 24/5, 2012 at 2:39

1

Solved

I am attempting to stream output from a weighing scale that is written in python. This program (scale.py) runs continuously and prints the raw value every half second. import RPi.GPIO as GPIO impo...
Schema asked 20/4, 2018 at 18:2

1

Solved

Consider the following code: import {spawn, exec} from 'child_process'; var child = spawn('su', [process.env.USER, '-c', 'while (true); do sleep 0.3; echo "tick"; done'], {stdio: ['ig...
Omeromero asked 21/1, 2015 at 15:25

2

Solved

I have a Node script that calls an external program (PluginManager.exe) this way: const util = require('util'); const execFile = util.promisify(require('child_process').execFile); const process =...
Mulcahy asked 4/4, 2018 at 16:42

2

Solved

I'm supposed to return the sum of first 12 terms of Fibonacci series from child process to parent one but instead having 377, parent gets 30976. #include <stdio.h> #include <unistd.h> ...
Felike asked 30/3, 2018 at 20:57

2

Hi I am using child_process.spwan to start a child process running a python script on Windows. The script listens on SIGINT to gracefully exits itself. But Windows does not support signals and all ...
Indult asked 18/10, 2016 at 20:33

1

I'm trying to write a Task control program, very much like Supervisor. I run some programs from a config file and let them run in the background, while in the main process I read and execute other...
Interpenetrate asked 15/1, 2018 at 14:59

1

Solved

I want to create a square thumbnail when a image was uploaded to cloud storage in firebase. I just want the center of the image cropped out in square, and have it resize it to 150px x 150px. Someth...
Thermosetting asked 26/11, 2017 at 20:54

1

Solved

I have an electron app where I need not only to run the interface to the user but also start an express server that will serve files for people connected through the network. I have everything wor...
Grison asked 3/10, 2017 at 22:55

1

Solved

How to print the stdout from console.log(require("child_process").execSync('ls')) I tried in ts import { execSync } from 'child_process'; console.log(execSync('ls -la')); which was then compile...
Propose asked 29/9, 2017 at 5:40

3

Solved

Here are my files: . ├── app.js ├── res.cls └── res.tex And here is the relevant contents of my app.js file: const { spawn } = require('child_process') const latex = spawn('pdflatex', ['res.tex...
Neelyneeoma asked 10/1, 2017 at 2:48

0

In the browser, it is way faster to send buffers instead of regular arrays. This is done in the following way: // create data that can be transfered var myData = [1,3,5,78,1,2,45,6,5,12]; var buff...
Voice asked 6/8, 2017 at 15:12

2

Solved

I want to be able to take a command string, for example: some/script --option="Quoted Option" -d --another-option 'Quoted Argument' And parse it into something that I can send to child_process.s...
Leix asked 6/5, 2014 at 6:27

1

Solved

I'm building an Electron application (Node.js) which needs to spawn gcloud app deploy from the application with realtime feedback (stdin/stdout/stderr). I rapidly switched from child_process to ex...

2

I use child_process.exec to run npm init, I can let it create package.json, but after creating, my stdin seems still open, I want to know when my child process finished so I maybe close the stdin, ...
Nestle asked 1/3, 2015 at 10:1

1

Solved

I am trying to write a simple node.js application in order to run selenium in a dedicate shell and then close the shell and the corresponding child process (at the moment after a timeout of 5 secon...
Cantaloupe asked 16/5, 2017 at 17:20

1

Here I am using fork method to do some calculation in node js. I have followed by the answer in link.It worked as expected and had started to do calculation. Here how can I get the details from th...
Boyt asked 19/4, 2017 at 8:19

1

I'm spawning a child process using Node 6.9. const child = require('child_process').execFile('command', args); child.stdout.on('data', (data) => { console.log('child:', data); }); child.stder...
Matthia asked 13/4, 2017 at 21:18

© 2022 - 2024 — McMap. All rights reserved.