processes

How to check which process is using write protected mode on file?

I have file which is opend with write protection for some process. Is there a simple way to check which process set write protection on that file in Windows Xp ? Any tool ? ...

How to know start and kill processes within Java code (or C or Python) on *nix

I need to write a process controller module on Linux that handles tasks, which are each made up of multiple executables. The input to the controller is an XML file that contains the path to each executable and list of command line parameters to be passed to each. I need to implement the following functionality: Start each executable as...

How can I force mod_perl to only allow one process per connection?

I have a perl cgi script that's fairly resource intensive (takes about 2 seconds to finish). This is fine as long as only at most 4 or 5 of them are running at the same time and that's usually the case. The problem is that when a user clicks a link that calls this script, a new process is spawned to handle that connection request, so if...

How can request handlers communicate in Django?

If you make a long-running http request to a Django application, can you send a second request to communicate with it? Can you share data between requests? Pylons has a concept of application globals. Top level variables in node.js are all application globals. How can I do this in Django? ...

How to make Processes Run Parallel in Erlang?

Hello, startTrains() -> TotalDist = 100, Trains = [trainA,trainB ], PID = spawn(fun() -> train(1,length(Trains)) end), [ PID ! {self(),TrainData,TotalDist} || TrainData <- Trains], receive {_From, Mesg} -> error_logger:info_msg("~n Mesg ~p ~n",[Mesg]) after 10500 -> refresh end. so, I created Two Processes nam...

C++ Get Username From Process

I have a process handle with HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, 0, THE_PROCESS_ID); How can I get the username of the user that is running the process? I am using unmanaged code (no .NET). ...

How to send Event signal through Processes - C

Hello all! I have an application consisting of two windows, one communicates to the other and sends it a struct constaining two integers (In this case two rolls of a dice). I will be using events for the following circumstances: Process a sends data to process b, process b displays data Process a closes, in turn closing process b Pro...

Working with processes in C

Hi, just a quick question regarding C and processes. In my program, I create another child process and use a two-directional pipe to communicate between the child and parent. The child calls execl() to run yet another program. My question is: I want the parent to wait n amount of seconds and then check if the program that the child has ...

C signals and processes

Hi, so basically I want "cmd_limit" to take a number in seconds which is the maximum time we'll wait for the child process (safe to assume there's only one) to finish. If the child process does finish during the sleep, I want cmd_limit to return pass and not run the rest of the cmd_limit code. Could anyone help me do this, here's what I'...

Code Design Process?

I am going to be working on a project, a web application. I was reading 37signals getting real pamphlet online (http://gettingreal.37signals.com/), and I understand the recommended process to build the entire website. Brainstorm, sketch, HTML, code. They touch on each process lightly, but they never really talk much about the coding pro...

C signal parent process from child

I'm trying to solve a problem I've got where a child process runs execvp() and needs to let the parent know if it returns. So, after the execvp() returns (because there's been an error), how can I tell the parent that this particular event has happened so it can handle it. There's one method of writing a string of text through the pipe ...

Faster forking of large processes on Linux ?

What's the fastest, best way on modern Linux of achieving the same effect as a fork-execve combo from a large process ? My problem is that the process forking is ~500MByte big, and a simple benchmarking test achieves only about 50 forks/s from the process (c.f ~1600 forks/s from a minimally sized process) which is too slow for the inten...

Is calling Process.Refresh() required for Process.HasFinished

Hello I am interested if calling Process.Refresh() is mandatory when waiting for the process to terminate by checking Process.HasFinished property? I have a piece of code that works fine without the Process.Refresh() call, however I am curious weather this is a coincidence? I can see that a msdn example has the Process.Refresh() call.....

select failing with C program but not shell

So I have a parent and child process, and the parent can read output from the child and send to the input of the child. So far, everything has been working fine with shell scripts, testing commands which input and output data. I just tested with a simple C program and couldn't get it to work. Here's the C program: #include <stdio.h> in...

C child read giving "resource temporarily unavailable"

So I have a file stream from a parent process to a child - and most of the time it works fine. However, when reading from it multiple times quickly, using fgets() will return NULL and the error is set to "resource temporarily unavailable". The problem is intermittent - and running the script that does the reads will sometimes have fgets ...

Ajax process from point of initiating a request to user seeing result?

Hi I'm looking for a straight forward list(with any notable information to match the point) of the separate processes involved from initiating the request object to the user seeing the end result in AJAX? Thanks. ...

How do you go about setting up monitoring for a non-web frontend process?

I have a worker process that is running in a server with no web frontend. what is the best way to set up monitoring fot it? It recently died for 3 days, and i did not know about it ...

[NSIS] Terminating a process before trying to copy files.

I'm developing an NSIS installer, to update a program that runs in background. Obviously, I'd like to send the program termination signals, because otherwise I repeatedly get a "can't write" error. How can I do this, with a limited overhead on installer size? ...

Microbenchmark showing process-switching faster than thread-switching; what's wrong?

I have two simple microbenchmarks trying to measure thread- and process-switching overheads, but the process-switching overhead is turning out to be lower than that of thread-switching, which is unexpected. The setup: 1.8GHz Core 2 Duo, 2GB RAM, Linux 2.6.32-21-generic x86_64 (Ubuntu 10.04). I'm getting: ~2.1-2.4us per process switch ~...

Integrating Jython Cpython

I am about to begin a project where I will likely use PyQt or Pyside. I will need to interface with a buggy 3rd party piece of server software that provides C++ and Java APIs. The Java APIs are a lot easier to use because you get Exceptions where with the C++ libraries you get segfaults. Also, the Python bindings to the Java APIs are ...