Questions tagged [external-process]
167 questions
88
votes
8 answers
How can I run an external program from C and parse its output?
I've got a utility that outputs a list of files required by a game. How can I run that utility within a C program and grab its output so I can act on it within the same program?
UPDATE: Good call on the lack of information. The utility spits out a…

Josh Matthews
- 12,816
- 7
- 36
- 39
73
votes
2 answers
Nodejs Child Process: write to stdin from an already initialised process
I am trying to spawn an external process phantomjs using node's child_process and then send information to that process after it was initialized, is that possible?
I have the following code:
var spawn = require('child_process').spawn,
child =…

zanona
- 12,345
- 25
- 86
- 141
62
votes
5 answers
How to call an external program in python and retrieve the output and return code?
How can I call an external program with a python script and retrieve the output and return code?

cfischer
- 24,452
- 37
- 131
- 214
61
votes
7 answers
How do I launch a completely independent process from a Java program?
I am working on a program written in Java which, for some actions, launches external programs using user-configured command lines. Currently it uses Runtime.exec() and does not retain the Process reference (the launched programs are either a text…

Lawrence Dol
- 63,018
- 25
- 139
- 189
31
votes
4 answers
Invoke external shell script from PHP and get its process ID
How can I invoke an external shell script (Or alternatively an external PHP script) from PHP itself and get its process ID within the same script?

Christian Studer
- 24,947
- 6
- 46
- 71
29
votes
10 answers
How do I find out if a process is already running using c#?
I have C# winforms application that needs to start an external exe from time to time, but I do not wish to start another process if one is already running, but rather switch to it.
So how in C# would I so this in the example below?
using…

csjohnst
- 1,678
- 3
- 17
- 24
17
votes
1 answer
Haskell: How to timeout a function that runs an external command
I call an external program inside a function. Now i would like to timeout this function and not just the external program. But after the function times out, the external program is still running on my computer (i'm using debian) until it finishes…

Josephine
- 457
- 2
- 11
14
votes
2 answers
How to launch and run external script in background?
I tried these two methods:
os.system("python test.py")
subprocess.Popen("python test.py", shell=True)
Both approaches need to wait until test.py finishes which blocks main process. I know "nohup" can do the job. Is there a Python way to launch…

jack
- 17,261
- 37
- 100
- 125
11
votes
2 answers
How to execute a .bat file from a C# windows form app?
What I need to do is have a C# 2005 GUI app call a .bat and several VBScript files at user's request. This is just a stop-gap solution until the end of the holidays and I can write it all in C#. I can get the VBScript files to execute with no…

wergeld
- 14,332
- 8
- 51
- 81
11
votes
12 answers
Why doesn't VS2010 debugger stop at my breakpoints?
I am working on a C#.NET class library project in VS2010. In my project settings -> debug settings, I have the project set to start an external program (C:\Windows\SysWOW64\wscript.exe) which runs a very simple jscript file (test.js). The script…

PICyourBrain
- 9,976
- 26
- 91
- 136
9
votes
1 answer
ProcessBuilder vs Runtime.exec()
I'm trying to create a frontend app in Java to handle batch SVG conversions using Inkscape's command line feature. I'm taking and updating the code from https://sourceforge.net/projects/conversionsvg/. The way the original developer handled calling…

blastthisinferno
- 529
- 1
- 6
- 18
9
votes
2 answers
python: run a process with timeout and capture stdout, stderr and exit status
Possible Duplicate:
subprocess with timeout
What is the easiest way to do the following in Python:
Run an external process
Capture stdout in a string, stderr, and exit status
Set a timeout.
I would like something like this:
import proc
try:
…

flybywire
- 261,858
- 191
- 397
- 503
8
votes
3 answers
C# : Redirect console application output : How to flush the output?
I am spawning external console application and use async output redirect.
as shown in this SO post
My problem is it seems that the spawned process needs to produce certain amount of output before I get the OutputDataReceived event notification.
I…

THX-1138
- 21,316
- 26
- 96
- 160
7
votes
5 answers
How to you check the status or kill an external process with python
I have a python script that runs on my web server. The main function is called then when it returns it just sleeps for a few seconds and gets called again. It's purpose is to pick up any new uploaded videos that users have added and convert them…

DrLazer
- 2,805
- 3
- 41
- 52
7
votes
1 answer
Calling external program from R with multiple commands in system
I am new to programming and mainly I am able to do some scripts within R, but for my work I need to call an external program. For this program to work on the ubuntu's terminal I have to first use setenv and then execute the program. Googling I've…

user3342784
- 103
- 1
- 1
- 4