loading and executing a new child process
Questions tagged [spawn]
1125 questions
0
votes
1 answer
Rspec and spawn gem: How to test "should_receive" in spawned_out process
I have a controller action which calls a spawn block
class MyController < ApplicationController
....
def send_product_mails
if @user.has_rights?
spawn_block(:nice => 19 ) do
@current_product.send_mail
end
end
…

Yo Ludke
- 2,149
- 2
- 23
- 38
0
votes
1 answer
Capture IO of spawned program in Java
I'm writing a program in Java which relies on a pre-compiled third party JAR residing in the same directory as mine. At runtime, my program checks if this file exists, then downloads it if it doesn't. Its main class is then executed. However, the…

MTCoster
- 5,868
- 3
- 28
- 49
0
votes
1 answer
Why doesn't spawn/3 (MFA) work in Erlang?
Here is a simple server in Erlang. I am trying to spawn using spawn/3 but I have to resort to using spawn/1 in order to get it to work.
-module(server_by_name).
-export([start/0]).
start() ->
{ok, Listen} = gen_tcp:listen(1234, [binary,…

GenericJam
- 2,915
- 5
- 31
- 33
0
votes
3 answers
erlang spawn process error?
I'm following this tutorial and I tried to compile the event.erl and run it according to
6> c(event).
{ok,event}
7> rr(event, state).
[state]
8> spawn(event, loop, [#state{server=self(), name="test", to_go=5}]).
<0.60.0>
9> flush().
ok
10>…

pandoragami
- 5,387
- 15
- 68
- 116
0
votes
1 answer
Restricting a buffer to the output of a nodejs child process
I'm trying to execute a command line command(here: cat) from nodejs using the spawn command.
var spawn = require('child_process').spawn;
var cat = spawn('cat');
result = new Buffer(2048);
cat.stdout.on('data', function (data)
{
…

funkysash
- 198
- 2
- 12
0
votes
2 answers
How to provide parameters to commands called by `system()`?
I want to execute the following commands from a C program:
amixer --quiet set Master 5+
amixer --quiet set Master 6-
Here, 5 and 6 are not fixed values. They are Input Arguments of the code which can have different values.
Can anybody please guide…
user731628
0
votes
1 answer
Where do the spawn() functions (declared in "spawn.h") come from?
I am unable to compile this simple program
#include
#include
#include
#include
int main(){
printf("Spawning new process...\n");
spawnl(P_WAIT,"curl","www.google.co.in",NULL);
system("cls");
…

vish213
- 748
- 3
- 12
- 27
0
votes
1 answer
Linux Process Spawn/Creation Trigger
I am attempting to programmatically track the processes a linux user is currently running. Is it possible to be notified when a user has fork-ed or exec-ed a new process, or is the only solution to perpetually poll the process list for new…

BrainCore
- 5,214
- 4
- 33
- 38
0
votes
1 answer
Rails app: Reconnect juggernaut redis after forking?
I'm working on a Rails app that is using Juggernaut to push data to clients at regular intervals. I use a controller action to get the pushing started; but since the pushing is often a long process (10 minutes or more), I am using spawn to fork the…

Alex Watt
- 927
- 5
- 14
0
votes
3 answers
Why does windows spawn process sometimes trigger error STATUS_SXS_ASSEMBLY_NOT_FOUND?
So, I have a tiny fragment of C code running on a windows box, that reads:
/* invoke command */
impl->procHandle = _spawnve(_P_NOWAIT, command, vargs, env);
if (impl->procHandle == -1) {
printf("Failed to invoke command: %s\n", strerror(errno));
…

Doug
- 32,844
- 38
- 166
- 222
0
votes
1 answer
Listen to background process's exit code in MakeFile
Solved
I need to spawn background processes in MakeFile and also consider their exit codes.
Scenario:
several processes are spawned in background.
MakeFile continue evaluation (and do not want to check spawned processes PIDs in some loop an so…

scherka
- 81
- 1
- 10
0
votes
1 answer
CCSequence like CCSpawn use functions from different classes
I try to use a few functions in my GameLayer. First - from another class, second - from GameLayer class, but CCSequence run like CCSpawn, not sequence. Separately they both work perfect in GameLayer.
in GameLayer
[self runAction:[CCSequence…

Alexander Sharunov
- 169
- 2
- 19
0
votes
1 answer
nodejs: run long command several times
I have a command that I need to execute three times. It generates lots of output to stdout and takes about a minute. After the three commands finish, a fourth (different) command should be executed. A shell script would look like…

topskip
- 16,207
- 15
- 67
- 99
-1
votes
0 answers
unity spawning the scene trying to keep track of items
I am adding spheres at pointer clicked event but it seems that I am working on a virtual copy. I tried to see whether the destructor is called but it is not
I am adding spheres at pointer clicked event but it seems that I am working on a virtual…

cdruno
- 1
- 1
-1
votes
1 answer
The HLS segment filename file path not incrementing
const ffmpegProcess = spawn(ffmpeg [
'-y','-i','/home/Documents/videotrans/video-transcoder/api/videoFiles/input/sample2.mp4',
'-s:v','1280x720',
'-b:v','2000000',
'-aspect','16:9',
'-b:a','64000',
'-r',…

Rakesh L
- 49
- 1
- 4