process

Reusing Process object and IO redirects in C#

I'm using the data ready events of the Process class to get information from the standard output and standard error of a running process. It works great on the first run, but after calling Stop() then Start() to force a restart of the application, I no longer recieve data. I've tried CancelErrorRead() but no luck there. I'm considering...

When doing a Process.Start() do you need to wrap it in a using?

When you are starting a process and dont care about the result is this ok? Process.Start(xxx); Or should you do this using (Process.Start(xxx)){} ...

Reliable bidirectional communication to a Linux process?

What is the reliable way of implementing bidirectional communication to a Linux process? I see that popen does not seem to support "r" and "w" access at the same time... or at least that's what is implied: The type argument is a pointer to a null-terminated string which must be either 'r' for reading or 'w' for writing. (I am so missi...

Console application prompting for input

I'm trying to put together a wrapper around a console application using StandardInput and StandardOutput. I'm getting stuck where the console application would prompt for input such as a password. I'd like to read from StandardOutput, prompt the user using the read text, and write the user's input back to the console application using ...

Where is Boost.Process?

I need to execute a program and retrieve its stdout output in c++. I'd like my code to be cross-platform too. Having recently discovered the wonderful world of the Boost c++ libraries for all your cross platform needs, I figured I'd just go to boost.org and read up on the documentation of Boost.Process. Much to my surprise, it wasn't th...

Debugging the reading of output of a Windows console app using Python

This question is very similar to this one. I want to read output from a console app of mine. The app does not terminate, nor does it take input from stdin. When I modify rix0rrr's solution to execute my app and then run his solution, Python hangs because read(1) does not return. The initial output of the app is "Starting the server.\n"....

MySQL process uses more than 100% CPU usage and need about 1 GB of memory

I am running MySQL server on the server's which has following specifications - Dual Xeon Quad Core 2.0, 2048 MB RAM, 1x 160 GB SATA Fedora Core + SSH But MySQL process for inserting 10000 records take more than 100% of CPU and up to 1 GB of RAM. It's a plain insert statement. Why is MySQL is taking so much of memory and what can done...

Tips for good division of labor between Design, Development, and HCI

I'm curious how other large-scale development shops (web-focused) divvy up the work between Designers, Developers, and HCI/Consumability Experts. Obviously: Developers will be writing code Designers will be responsible for graphical assets and probably some HTML/CSS HCI Experts will be doing usability reviews, coming up with usage sce...

why doesn't this erlang code work???

fib(N)-> P1 = spawn(fun concFib:conFib/0), P2 = spawn(fun concFib:conFib/0), X=rpc(P1,N-2),Y=rpc(P2,N-1),X+Y. conFib()-> receive {Client,N} -> Client ! regfib(N) end. rpc(Pid,Request)-> case erlang:is_process_alive(Pid) of true -> begin ...

What is process/reaper and why isn't it working?

When deploying my Rails app via Capistrano, the very last thing it tries to execute is this: sudo -p 'sudo password: ' -u app /home/user/public_html/example.com/current/script/process/reaper Then it throws this error: failed: "sh -c \"sudo -p 'sudo password: ' -u app /home/user/public_html/example.com/current/script/process/reaper\""...

How can i do this with the C# 'new Process' object.

Hi folks, I wish to pass some data to the delegate method, of a Process object, when it fires the Exited event --- i'm not sure how. I've got some code (in a windows service) that is going to take a while .. so i'm forking off a new process to do it .. like ... string recipientEmail = "[email protected]"; var commandProcess = new P...

Python library for Linux process management

Hello, Through my web interface I would like to start/stop certain processes and determine whether a started process is still running. My existing website is Python based and running on a Linux server, so do you know of a suitable library that supports this functionality? Thanks ...

Why this program fails (sometimes)?

#include <cstdio> #include <QtCore/QProcess> int main (int argc, char** argv) { // if we remove 3 following lines, the problem described below doesn't exists!! QProcess process; process.start ("asdqwe"); // doesn't matter what we try to execute here. process.waitForStarted (1000); while (true) { char buf[100]; if (sca...

Threads & Processes Vs MultiThreading & Multi-Core/MultiProcessor : How they are mapped?

I was very confused but the following thread cleared my doubts: Multiprocessing, Multithreading,HyperThreading, Multi-core But it addresses the queries from the hardware point of view. I want to know how these hardware features are mapped to software? One thing that is obvious is that there is no difference between MultiProcessor(=Mut...

User Stories - Problems that can't be made user stories

I am from an XP background. I know the process very well and have solid working experience with it. I have found it to be the best way to develop software. I find myself in the position of a process doctor of sorts and this creates much self examination and revaluation of my own understandings. A very common thing I hear is that some...

Bash script always true

Is there any reason this script always give me running ? In both cases, when my process is started and when my process is stopped. if ps ax | grep -v grep | grep "processName" > /dev/null then echo $"running" else echo $"not running" fi Thank you very much UPDATE : I add a full exemple of my script, maybe smothing wrong somewhe...

How to know if my program crashed the last time it ran?

If my program doesn't tear down correctly, the system becomes unstable. There is no workaround really. So, should my program crash and not tear down correctly, then I need to tell the user when he tries to run it again that the system was left in an unstable state. Is the right way to do this is to create a lock file when I start and del...

Limit the Number of Created Processes

I have two classes: Action class, that has a method for executing VBScript files, and Item class that contains a list of Action instances. My problem is that I want to limit the number of VBScript files that can be run at the same time. I have no experience with this, and I have googled and searched around, but found nothing. My only ide...

Is it normal for so many ruby processes to be running?

I'm having issues with a site on my server loading and was running 'top' and saw this: Dozens of ruby processes...and I have no idea what that means or if that's normal. :) ...

How to get process's grandparent id

How can i get process id of the current process's parent? In general given a process id how can I get its parent process id? e.g. os.getpid() can be used to get the proccess id, and os.getppid() for the parent, how do I get grandparent, My target is linux(ubuntu) so platform specific answers are ok. ...