I'm learning to write a TCL (expect) scripts and I notice that some examples show to use spawn, while others show the command exec. I tried googling, but can't find what is the difference?
Suppose I call 'exec' in a middle of a long expect script, what can I expect to happen?
...
I have the following post-build step in a VC++ 2005 project that calls a Python 2.5.1 script:
postbuild.py
postbuild.py does:
import os
os.system('cd') # cd is just a test, could be anything
The process never starts, and it's the same with any other process I try, even using subprocess.call or Popen instead of os.system.
Does anyo...
Hi,
I use posix_spawnp to execute different processes and I check the status (with waitpid) to make sure the child was created properly
int iRet = posix_spawnp(&iPID, zPath, NULL, NULL, argv, environ);
if (iRet != 0)
{
return false;
}
int iState;
waitpid(static_cast<pid_t>(iPID), &iState, WNOHANG);
cout << "Wait: PID "...
I'm calling Microsoft's _wspawnv function, and it keeps returning -1 with errno set to 22; errno.h defines this as EINVAL. According to Microsoft's documentation for _wspawnv, this code should only be returned if the mode parameter is invalid. I've tried calling it with _P_WAIT and _P_NOWAIT in the first parameter, and both return the ...
im spawning a script that runs for a long time from a web app like this:
os.spawnle(os.P_NOWAIT, "../bin/producenotify.py", "producenotify.py", "xx",os.environ)
the script is spawned successfully and it runs, but till it gets over i am not able to free the port that is used by the web app, or in other words i am not able to restart th...
Hello,
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 processes.
Thanks,
Ken
...
After writing the following program, it does not appear to pass arguments to the called application. While researching _spawnv and what it can do, _execvp was found as what appeared to be a suitable alternative. Does anyone see the problem in the source code and know what needs to be done to fix it?
#include <stdio.h>
#include <stdlib.h...
([email protected])8> spawn([email protected], tut, test, [hello, 5]).
I want to spawn a process on bar.del.com which has no file system access to foo.hyd.com (from where I am spawning the process), running subroutine "test" of module "tut".
Is there a way to do so, w/o providing the [email protected] with the compiled "tut" module fi...
Python have been really bumpy for me, because the last time I created a GUI client, the client seems to hang when spawning a process, calling a shell script, and calling outside application.
This have been my major problem with Python since then, and now I'm in a new project, can someone give me pointers, and a word of advice in order f...
I am trying to figure out how to spawn a process / start an EXE from Rhozet Carbon Coder.
The manual mentions a task that sounds promising, "ExternalProcess", in section 5.8.2 but does not document this task.
Has anybody had success doing this, or knows where the ExternalProcess task is documented?
...
Hello,
I was using the spawn plugin (http://rubyforge.org/projects/spawn/) which worked excellent. However, I then moved to Mongo (using mongo_mapper) and Spawn no longer worked.
Modifying the plugin is beyond the scope of my abilities. Is there a simple way to do spawning in Rails that would work with Mongo? It's not an often-run proc...
If I spawn a new process on a busy node in an erlang cluster and other nodes are idle will the process automatically be spawned on one of the free nodes?
Update: I found another question similar to this one too:
http://stackoverflow.com/questions/662131/using-erlang-how-should-i-distribute-load-amongst-a-cluster
...
I'm writing a piece of c# code that launches an installer and waits for it to return before continuing with other stuff.
I'm having trouble with certain installers that spawn other processes with the original process returning before the install has actual finished. Is there some way that I can wait until all the processes have finished...
In an application I am developing (in C), a loader app must first be run before the main application is executed. I have made it so the main app runs the loader app as a child when it is launched in order to automate this task. This all works well, except for the fact that the loader app only needs to be run one time during the user's cu...
I'm making a Rails application.
In the one action I need to spawn a long running process.
This is not a problem. I can fork new process using spawn gem or some other.
But some time after process has been spawned,
user must be able to pass additional data to that process.
Sure, I can fork process which will listen a UNIX socket,
store so...
I am using jabber bot written in python to log some MUC talks. Sometimes it drops on some network or XMPP problems. In this case I have to start it again by myself. The goal is to make it "self-respawning".
I have some variants about how to do it.
Bot is one process. Another process
monitors its activity and starts it
if bot died.
Mai...
Hello,
I am working on a decentralized Erlang application. I am currently working on a single PC and creating multiple nodes by initializing erl with the -sname flag.
When I spawn a process using spawn/4 on its home node, I can see output generated by calls io:format/2 within that process in its home erl instance.
When I spawn a proce...
How can a Java application spawn a new interactive application (e.g. an command line editor) from Java/Scala?
When I use Runtime.getRuntime().exec("vim test"), I would only get a Process instance, while vim would be running in the background; rather then appear to the user.
...
Hello,
I am interested in opening the Google Navigator app from inside an application I am writing. I want to be able to spawn it at a given time and pass specific data into it.
Can anyone think of a good way for me to do this? What permissions do I need, etc? Thank you very much.
...
Okay so I started learning erlang recently but am baffled by the errors it keeps returning. I made a bunch of changes but I keep getting errors. The syntax is correct as far as I can tell but clearly I'm doing something wrong. Have a look...
-module(pidprint).
-export([start/0]).
dostuff([]) ->
receive
begin ->
io:form...