Questions tagged [external-process]
168 questions
73
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…
![](../../users/profiles/3830.webp)
Josh Matthews
- 12,061
- 6
- 32
- 38
60
votes
1 answer
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 =…
![](../../users/profiles/165750.webp)
zanona
- 11,379
- 24
- 78
- 137
57
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?
![](../../users/profiles/74415.webp)
cfischer
- 23,024
- 36
- 125
- 209
55
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…
![](../../users/profiles/8946.webp)
Lawrence Dol
- 59,198
- 25
- 134
- 183
28
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?
![](../../users/profiles/6260.webp)
Christian Studer
- 22,792
- 6
- 39
- 70
27
votes
9 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…
![](../../users/profiles/1292.webp)
csjohnst
- 1,648
- 2
- 18
- 24
16
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…
![](../../users/profiles/624687.webp)
Josephine
- 347
- 1
- 11
13
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…
![](../../users/profiles/192767.webp)
jack
- 15,121
- 32
- 94
- 122
12
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…
![](../../users/profiles/33727.webp)
wergeld
- 13,980
- 7
- 49
- 78
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…
![](../../users/profiles/233087.webp)
PICyourBrain
- 9,386
- 26
- 87
- 133
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…
![](../../users/profiles/358549.webp)
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:
…
![](../../users/profiles/63051.webp)
flybywire
- 232,954
- 184
- 384
- 491
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…
![](../../users/profiles/312943.webp)
DrLazer
- 2,867
- 3
- 34
- 48
7
votes
2 answers
Memory limit for running external executables within Asp.net
I am using WkhtmltoPdf in my C# web application running in .NET 4.0 to generate PDFs from HTML files. In general everything works fine except when the size of the HTML file is below 250KB. Once the HTML file size increases beyond that, the process…
![](../../users/profiles/549772.webp)
itsbalur
- 953
- 2
- 17
- 38
6
votes
1 answer
Parallel implementation slower than serial in Julia
Why in the following Julia code the parallel implementation runs slower than the serial?
using Distributed
@everywhere function ext(i::Int64)
callmop = `awk '{ sum += $1 } END { print sum }' infile_$(i)`
run(callmop)
end
function fpar()
…
![](../../users/profiles/5661001.webp)
panadestein
- 1,061
- 8
- 18