I'm trying to execute a script from within my java code which looks like:
Process p = Runtime.getRuntime().exec(cmdarray, envp, dir); // cmdarray is a String array
// consisting details of the script and its arguments
final Thread err = new Thread(...); // Start reading error stream
err.start();
final Thread out = new Thread(...); // S...
Edit For anyone having an issue, it turns out to be, as usual, a simple problem to solve. The keys need to be installed under the service account. Log on to the workstation under the service account, install the keys, and then it can be run from any session that would be launching it under the service account context. Problem solved.
...
Hi Everyone
I'm wrestling with the concepts behind subprocesses and pipes, and working with them in a Python context. If anybody could shed some light on these questions it would really help me out.
Say I have a pipeline set up as follows
createText.py | processText.py | cat
processText.py is receiving data through stdin, but how i...
Most offices today use Microsoft Office for documentation and presentation. Lots of programmers prefer to work and develop under Linux. When your shop uses both, how do you do your development in Linux and documentation in Windows and stay productive?
...
Hello every one.
I'm faced with a weird problem. My application has a simple method that in case IE enters a state were it gets unresponsive this method is fired closing all IE process's and then the application restarts its work with IE.
Method code:
foreach (System.Diagnostics.Process exe in System.Diagnostics.Process.GetProcesses()...
I got into the habit of removing trailing white spaces from my source file. In fact, I have my editor to do this automatically. I got in this habit by using git; it created a habit that I adhere to.
My question relates to the fact that I cannot justify this behaviour. I can understand that in some fields, such as web designers, it may ...
I have to run a console application from my Windows Application. The console application I want to run is an Embedded Resource in my application, and I am calling it like this:
// Run the updater and grab its output
Process Updater = new Process();
Updater.StartInfo.FileName = "C:\\tmp\\tmp.exe";
Updater.StartInfo.WindowStyle = ProcessW...
i have to variable of HANDLE type .
first variable is a process HANDLE (with name hProcess) that have'nt PROCESS_QUERY_INFORMATION access right.
second variable is a process HANDLE (with name hwndProcess) too that i opened via OpenProcess function and have PROCESS_QUERY_INFORMATION access right. i sure both process is a one.
but when ...
If anyone could please help me out, that would be great :)
This seems to be a tough one. Starting from the process ID, I need to be able to grab:
How much CPU the process is taking up in %
How long the process has been using the CPU
This needs to be written in Cocoa/ Objective-C or C. It also needs to work on Tiger through Snow Leop...
Our application has a background thread which spawns a process through System.Diagnostics.Process:
Process.Start(
new ProcessStartInfo
{
FileName = url,
UseShellExecute = true
}
);
This used to have no issues at all. But now, the background thread is silently dying; it never returns from the call to Proces...
Ok so I'm just starting to try and use BDD for some new development we are doing and I wrote up a story like this for a log viewer feature:
Story: User reviews workflow execution logs
As a user
I want to review the log of rules execution
So that I can examine the results and make adjustments/fixes to the rules definitions
with some s...
Hi Everyone ,
Iam working in c++ .i have an problem while run an application ,which have my dll within it ,My dll code is suitable to application (needed process).i wrote a log file (xml file) throughout application using fopen within all function(dll source) ,here i receive exception like "cannot access the file ,due to using by anot...
I'm looking for inputs into how I can manage the upgrade process itself of a homegrown php/mysql application. Meaning, if we have a 'stable' version of our php/mysql application working on our production server, and we now want to upgrade it to the next version that we've worked on - how do we go about doing that elegantly? What practice...
Hi all! :-)
I'm writing a small updater for my app.
My flow would be like this:
app.exe -> call process(updater.exe) -> app.close()
Then, updater check if app is closed, then overwrites app.exe and other satellite assemblies.
So I need to do something like this: launch my C# exe app, fire a process for updater.exe, then close app, but ...
Hello Everyone!
Any help with this problem would be fantastic. I appreciate all contributions!
Let us say I'm running a daemon that is observing the behaviour of the app that has keyboard focus. I have it's PID and process name. Is there any way I can see what files that application is accessing?
I'm programming in Objective-C, Cocoa ...
i am new to subprocess module of python, currently my implementation is not multi processed.
import subprocess,shlex
def forcedParsing(fname):
cmd = 'strings "%s"' % (fname)
#print cmd
args= shlex.split(cmd)
try:
sp = subprocess.Popen( args, shell = False, stdout = subprocess.PIPE, stderr...
We have a convention whereby developers get into a server with their own username, and then sudo su - django where django is the user our apps run under.
I need to find out which developer is running a script as django. With ps faux :
root 26438 0.0 0.0 90152 3320 ? Ss 10:38 0:00 \_ sshd: fred [priv]
fred 26444 ...
I'm playing around with a webserver, using a unix socket and sendmsg / recvmsg to pass the socket file descriptor to a new server process without losing any requests. While testing it with ab I found that client connections would linger, and apachebench (ab) would show the error: "apr_poll: The timeout specified has expired (70007)".
I ...
I export try.jar file using 32 bit java libraries. On the client site, I have 64 bit java libraries. Can try.jar behave 64 bit executable?
For example, I have
Runtime rt = Runtime.getRuntime();
s = rt.exec("someExecutable");
the someExecutable binary is in 64 bit and using this code with 32 bit java libraries seems to be not working...
I want to create a process with syntax similar to the following,except that I don't want to create a thread:
hThread = CreateThread(
NULL, // no security attribute
0, // default stack size
InstanceThread, // thread proc
(LPVOID) hPipe, // thread parameter
...