spawning

How to spawn a process and capture its STDOUT in .NET?

I need to spawn a child process that is a console application, and capture its output. I wrote up the following code for a method: string retMessage = String.Empty; ProcessStartInfo startInfo = new ProcessStartInfo(); Process p = new Process(); startInfo.CreateNoWindow = true; startInfo.Redirect...

How to deploy Django with Spawning

There's no much documentation on how to deploy a Django project with Spawning and yet people are recommending it over apache/mod_wsgi. In another similar question, other SO user suggested me to open a new question specific to Spawning, so hopefully others can share their experiences too. ...

Python script at Visual C++ 2005 build step not spawning other processes.

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...

Spawned processes becoming defunct

I use posix_spawnp to spawn child processes from my main process. int iRet = posix_spawnp(&iPID, zPath, NULL, NULL, argv, environ); if (iRet != 0) { return false; } Sometimes, after a child process is spawned without errors, it suddenly becomes defunct. How could this occur? I use a signal handler to rea...

How to spawn Linux process from Windows application?

My interactive 32-bit Windows app (now moving from Delphi [Ent] 2007 to 2009) uses command-line interactions to spawn child processes that do computationally-intensive tasks, which in turn write text files that the GUI parent app parses and analyzes - resulting in an interactive graphical display of the results. I have access to a multi...

Spawning and terminating a person in a sim game (in Java)

Hi all. I am developing a 2D grid based sim game. Progress is good. Been cracking out code for the last few days really well, and I've been having some issues today. I build two rooms, set the door position, and spawn a person. The person has the 2 room types that they must visit in order to be cured (It's a remake of Theme Hospital). I...

Programmatically launch sfx archive on Windows 7 (using _execv)? (C++)

My (MS Windows) application can update itself over the internet by download a self extracting archive and launching it via _execv (C++). Now while launching the sfx archive works fine on Windows XP, it doesn't on Windows 7. I guess it has to do with UAC, but even turning UAC off didn't cure this problem. The downloaded sfx archive has th...

How to spawn thread when defined function is set (sequentially dependent) and calling is spatially dependent

Hi. I apologize for my question being a bit confusing. So I have code written in python but also used H3D haptics platform. I'm trying to unload some of the processing of this one, very large thread so that I can log faster. I'm not sure how to write it since a function 'moveCursor' is already defined and later set to a specific number...

recv-q and send-q between spawning+memcached gets bloated after a few hours

I'm using python-memcached 1.45 with python 2.5.2, django 1.0.4, spawning 0.9.2, eventlet 0.9.3 and libevent 1.3 on 64bit debian lenny. spawning server is started with parameters given below: /usr/bin/python /usr/bin/spawn --factory=spawning.django_factory.config_factory myproject.settings \ --port=8006 --processes=1 --threads=0 --st...

How does one run Spawning with Django within a virtualenv?

Because of the way Eventlet, which Spawning depends on, installs itself, it can't be installed into a virtualenv. The following error (wrapped for readability) illustrates: Running eventlet-0.9.4/setup.py -q bdist_egg --dist-dir \ /tmp/easy_install-m_s75o/eventlet-0.9.4/egg-dist-tmp-fAZK_u error: SandboxViolation: chmod('/home/myuser/...

How can my ASP.NET webapp spawn a program in a new thread within the same Process?

I have an ASP.NET application which needs to run a command-line tool. I want to start it under the same process as the application pool so it is subject to the IIS CPU throttling, etc. How can this be done? ...

How do I check if a program has already been executed during the current login session? (Windows)

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...

Run a process as a synchronous operation from a Win32 application

I have an existing utility application, let's call it util.exe. It's a command-line tool which takes inputs from the command line, and creates a file on disk, let's say an image file I want to use this within another application, by running util.exe. However it needs to be synchronous so the file is known to exist when processing contin...