processes

Process management using Ant

Are there any ant tasks out there for listing running processes and optionally killing them, something that is not platform dependent (i.e wraps both tasklist and ps) ? ...

Can the Process Class be used to determine if a process is already running?

I'm using the Process Class to start processes, but don't ever want more than one instance of any program to be running. Looking at the documentation, there are lots of likely-looking properties, but nothing that stands out as the most obvious. What's the best way to determine if a process is running? Edit: John Fisher is right: it's ...

How can I find the Unix process that owns a local Sleeping MySQL connection?

I'm fighting a 'Too many connections' problem with my MySQL process and I've got to the point when mysqladmin processlist -uroot -pXXXXX results in: +------+------------+-----------+------------+---------+------+-------+------------------+ | Id | User | Host | db | Command | Time | State | Info | +------...

How to start/stop proccess on remote machine using C# ?

How to start/stop proccess on remote machine using C# ? Remote computer is runing winXP sp3 and I have administrator account there. I always get access denied error. *Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))* I am using C3 and .net 3.5. ...

What is crossplatform Java analog for Windows SetProcessClass?

How to set my process PriorityClass to "realtime" on windows (xp and later is in my main intrest) and its analogs on Lin? What is crossplatform Java analog for Windows SetProcessClass? ...

Creating a heater application

This might seem wierd, but I'm interresting in creating an electric heater outta my computer, that is program an application, that heats up my pc, and I need some help. I currently made an application, that runs infinite loops on the GPU(using a little shader), and on the CPU cores, however I'm interresting in getting the ram going too,...

Bash: redirecting output from a process that's already running?

Is there a way, in Bash, to capture/redirect the output (and stderr?) of a process once it's already running? ...

Parallel Processes Results Written To Single File

I am new to Linux and was introduced to the "&" recently. I have to run several traceroutes and store them in a single file, and I am curious if I am able to kick off these traceroutes in parallel? I tried the following but the results in the generated file, are not kept apart? Well, that is what it seems to me. traceroute -n -z 10...

How can I ensure only one copy of a Perl script is running at a time?

I need to ensure that only one copy of my Perl script is running at a time. According to the suggestions here I wrote a sub to do the check: sub check_instances { open my $fh, '<', $0 or die $!; unless (flock($fh, LOCK_EX|LOCK_NB)) { print "$0 is already running. Exiting.\n"; exit 1; } } But it doesn't ...

Change a variable contained in one process from a different process

(probably a dumb question) // Program_1.exe: int num = 1; using (Process process = new Process()) { process.StartInfo.FileName = "Program_2.exe"; if (process.Start()) { process.WaitForExit(); } } Console.WriteLine(num.ToString()); // num should now equal 2 Psuedocode // Program_2.exe: // I want this program to change the ...

java new process - is necessary to get and read from ErrorStreams and Output streams

I create new process from a java code using ProcessBuilder ProcessBuilder builder = new ProcessBuilder("/path/to/bin"); Process process = builder.start(); In this case, I am not interested in seeing error/output. Is it necessary to grab OutputStream and ErrorStream? Is it automatically ignored? Output may be large (10MB) -- in some...

How to use python in windows to open javascript, have it interpreted by WScript, and pass it the command line arguments

I have a format holding paths to files and command line arguments to pass to those files when they are opened in Windows. For example I might have a path to a javascript file and a list of command line arguments to pass it, in such a case I want to open the javascript file in the same way you might with os.startfile and pass it the com...

Unix C program issue using pipes and processes

Here's the story: Write a program in C that creates a child process and a granchild process (child of a child process!). The father process should read the contents of a file which name will take as an argument when you run the program. The father should send the text read to the child, which takes to convert those characters 'a' found ...