loading and executing a new child process
Questions tagged [spawn]
1125 questions
-1
votes
1 answer
Nodejs child_proccess.spawn no output using stdio: 'inherit'
I'm using node.js child_proccess.spawn() in order to execute few command lines in CMD and get the output.
I have encountered few issues:
When i'm trying to spawn the proccess witout stdio: 'inherit' option - The CMD freezes after executing the last…

Amit
- 11
- 4
-1
votes
1 answer
Error handling when using xdmp:spawn-function method in Marklogic
I have created a REST API that receives a HTTP POST request(array of json requests) from UI. This would trigger a Xquery code which would spawn the requests to execute some functionalities and it may 10-30 mins to get completed. The max request…

Antony
- 183
- 8
-1
votes
1 answer
Reusing SSH key passphrase between multiple command lines
I'm using NodeJS to execute multiple git command lines. Updating submodules, pulling some projects, etc. Everything works but I have an inconvenient issue. When I perform two command lines, like this
const exec =…

Magus
- 14,796
- 3
- 36
- 51
-1
votes
1 answer
how do instantiate GameObject as child of a selected object
I want to instantiate a game object as a child of the selected object. need help
right now I'm using this Instantiate(EnemyPrefab[Random.Range(0, EnemyPrefab.Length)], SpwanPos, Quaternion.identity);

HitesH
- 21
- 1
- 3
-1
votes
3 answers
Spawning random GameObject in map (no repetitions)
Im making a terror game, and i want to spawn little collectibles in my scene, my code works fine, but they repeat the world location in every instantiate:
using UnityEngine;
public class objectivesGeneration : MonoBehaviour
{
GameObject[]…

Krip Coder
- 7
- 2
-1
votes
1 answer
tail -f -n 1 returns all content , not changes
part one:
I have a text.txt file in linux ubuntu.
I want to watch the file with tail for grabbing the last content of the file.
# command linux
tail -f text.txt
this command returns all of the content.
so I changed it to :
# command linux
tail…

Babak Abadkheir
- 2,222
- 1
- 19
- 46
-1
votes
1 answer
Unity, Spawn a prefab to "nearestTarget" gameObject's location
I'm creating a game where objects are being created. These objects are moving left and the player has to press space bar before the object reaches the end of the screen. Every thing works fine with the exception of spawning a prefab on the moving…
-1
votes
1 answer
Node.js: Synchronous child_process spawn
Looking for the easiest way to synchronously spawn a child_process.
Sort of surprised I can't find anything.
I don't have a lot of experience with promises, async/await so I don't really have any existing code
Thanks in advance

Sterling Butters
- 1,024
- 3
- 20
- 41
-1
votes
1 answer
Convert child process based Promise to async await
This is my existing code. I tried to get data with a child process spawned, and the promise resolves after the child is terminated
const {spawn} = require('child_process')
const getDataFromChildProcess = params => new Promise(resolve => {
const…

auphali
- 139
- 1
- 8
-1
votes
2 answers
How to get exit code from the expect/spawn command in unix
Based on one of the topics posted here, i have designed my expect script to return the exit code but for some reason it keeps on running and doesnt exit at all
I am using the below script to
-get a file from the remote server
-delete the file after…

Allen
- 1
- 1
-1
votes
1 answer
nodejs - python file not exported in production?
Curios regarding production method. My python file successful in root electron under development mode.
code to calling the python
const spawn = require('child_process').spawn;
const output = spawn('python', ['test.py']);
ls.stdout.on('data', (data)…

aa6my
- 1
- 6
-1
votes
1 answer
NODEJS: Results page is displayed before search is finished
I want to query 3 databases and display the results in a results page, but this page is displayed before the query is finished.
How can I display the results page ONLY after the 3 queries are finished?
I have tried promises, callback functions,…

Felipe
- 15
- 2
-1
votes
2 answers
Start another process in background and capture output in Python
In python I want to start another python script as background process and after few sec I need to kill that spawned process and get the stdout into a variable.
I tried with subprocess.Popen, I am able to spawn as background process and kill after…

rashok
- 12,790
- 16
- 88
- 100
-1
votes
1 answer
Python module 'spawn'. Module object is not callable
This is my code:
import pexpect
import spawn
host = 'xx.xx.xx.xx'
userName = 'akshay'
password = 'xxxxxxxxxxxxxx'
**child = spawn('ssh %s@%s' %(userName, host))**
child.setwinsize(1000,200)
child.expect(['password'], timeout=5)
Here I'm trying to…

Akshay Bhaskaran
- 21
- 1
- 4
-1
votes
1 answer
Python - is it possible to dynamically spawn functions
Is it possible to dynamically spawn functions?
I have written a function that parses this example.xml file and returns the attributes for the segment_1 element as a list.
Now this example contains four segments however this will change for different…

death and gravity
- 619
- 1
- 8
- 21