process

Strange issue with using Java ProcessBuilder on Windows 2008 R2 Standard

Hi all, I've delopped some Scala code to control the lifecycle of MySQL server. The code runs fine on Windows XP, but fails under Windows 2008 R2 standard with the following exception: Exception in thread "main" java.io.IOException: Cannot run program "mysql" (in directory ".\bin"): CreateProcess error=2, The system cannot find the fil...

get exact argument list of a process using ps

I am writing a session saver for GNU Screen. It needs to get every process argument list. Linux has /proc/PID/cmdline which separates arguments with \0. Solaris has pargs. But I am looking for a more crossplatform solution and ps tool seems to be the best bet. "ps -o command" displays argument list but separates arguments only with space...

Redirect standart stream (Process.Start)

Hi. I have the following code: private void button1_Click(object sender, EventArgs e) { Process process = new Process(); ProcessStartInfo processStartInfo = new ProcessStartInfo(); processStartInfo.Arguments = "-i 1 -x"; processStartInfo.CreateNoWindow = false; processStartInfo.FileName = @"...

AIR - Launching Native Process In Windows Not Working

i'm attempting to launch a command line executable program as a background process in Windows 7, but it's not working. my AIR application is a native installer application: myAIRApp.exe. i've bundled myApp.exe with my AIR application, so that when it launches for the first time, the application copies myApp.exe to the applicationStorag...

Start VLC from asp.net webpage

I have the following code: protected void VLC_Click(object sender, EventArgs e) { SecureString password = ConvertStringToSecureString("[password]"); string domain = ""; Process.Start(@"C:\Program Files\VideoLAN\VLC\vlc.exe ", "[username]", password, domain); } private SecureString ConvertStringToSecureString(string s) { ...

How to interchange data between two python applications?

I have two python applications. I need to send commands and data between them (between two processes). What is the best way to do that? One program is a daemon who should accept commands and parameters from another GUI application. How can I make daemon to monitor comands from GUI, while making it's job? I prefer solution would be cros...

List processes that use the smart card readers

I'm writing a Windows service that must handle Smart card readers. Very often, when I try to connect to an inserted Smart card, SCardConnect() fails with SCARD_E_SHARING_VIOLATION which basically means: The smart card cannot be accessed because of other outstanding connections. Fair enough. I guess that a least one other process ...

How to print the top 10 users by the number of processes ?

How could I print the top 10 users on a linux distribution by the number of processes they have running? I have managed to do this using a shell script, but now I'm interested at how I can do this using Python. ...

I want to optimise the upload of a file onto the server - whats the best way to do it?

Hi all, I have a rails app that does the following (at the moment linear) process: (1) User uploads a file via HTTP and a standard upload form on a standard HTML page (2) The file is uploaded to an apache server (same server as the one hosting the app) (3) The server uploads the file to remote storage service (call this storage 1) (4) ...

Windows, multiple process vs multiple threads

hi, we have to make our system highly scalable and it has been developed for windows platform using VC++. Say initially, we would like to process 100 requests(from msmq) simultaneously. what would be the best approach. single process with 100 threads or 2 processes with 50-50 threads. What is the gain apart from process memory in case o...

how to kill background php thread ?

I created a php script that has ignore_user_abort(true); in it, and it is running in infinite loop... I closed the webpage, apache server and the browser too.. Its running like a armageddon now.. Nothing seems to stop it.. how do I stop it ?? What does it run as (process name) in windows ?? I searched for terms related to php or server ...

Failed to share Windows Event kernel object between C++ and VB processes

I am in Windows 7 x64, and trying to use the same Event object between 2 processes, one is an vb application, and the other is a C++ application, but seems the event created in one process can't be recognized in another one: VB Option Explicit Private Type SECURITY_ATTRIBUTES nLength As Long lpSecurityDescriptor As Long bI...

Problems killing child process invoked in Java

Hi, From within my program, I invoke a Linux process, read the output from that process, process it and then sleep until the next iteration. The problem I'm having is that the process I call doesn't always die, even when I do a childProcess.destroy(). Here's the code: while(true) { Process childProcess = Runtime.getRuntime().exec("...

Delegate works without instance creation

My Two versions of the following declarations work fine. 1) Func<int,int,int> findMax=Max; Console.WriteLine("Max={0}",findMax(10,20)); 2)Func<int,int,int> findMax=new Func<int,int,int>(Max); Console.WriteLine("Max={0}",findMax(10,20)); where public static T Max<T>(T a, T b) where T:IComparable { if (a.CompareTo(b)...

Process.Start() impersonation problem

Trying to start process with another access token, without success, it runs as the non-impersonated user. using (WindowsIdentity identity = new WindowsIdentity(token)) using (identity.Impersonate()) { Process.Start("blabla.txt"); } How to make this work properly? ...

how can I avoid performance bottleneck when using jni in a java web application/service

Greetings, I could not provide all the details in the question, so here are the key details. I have a native dll (and a corresponding .so) wrapping a static library, which is created by Eiffel programming language. I've written a C++ wrapper around the static lib, and I've successfully exposed this to Java. However, if I use this dll ...

AIR - Batch File As CMD.exe Argument

AIR doesn't permit launching .bat files as a native process directly, so apparently i'm suppose to set CMD.exe as my startupInfo executable and pass my .bat file and it's arguments. i can't get it to work, so i'm hoping it's a syntax problem. here is my code: var testStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(...

Process.Start() returns null on own process.

I'm using Process.Start() to initialize an elevated copy of the currently running application. Unfortunately Process.Start() returns null because it thinks it's using an existing process of my application, and while there is an existing process, it doesn't specify any way of handling this kind of entry point. Is there any way in .NET (...

How to get CPU and RAM usage for each process in C# using WMI

How to get CPU and RAM usage for each process in C# using WMI ? I want to do something like windows Task Manager just simpler. Best regards. EDIT: OK, after some testing I found few isues: 1. Process class from System.Diagnostic has to many limitations when dealing with remote system 2. WMI to remote computer is very slow, about 15 s...

Why does Process.waitFor() never return?

I am launching a windows process (wrote in C++ but I don't have sources) from Java code in the following way: Process p1 = Runtime.getRuntime().exec(cmdAndParams); p1.waitFor(); My problem is that the waitFor() method never ends. Thus I tried to launch the process in a simple shell and it ends correctly with many print in the shell ...