processes

Unwanted buffering when filtering console output in Win32

My question is related to "Turn off buffering in pipe" albeit concerning Windows rather than Unix. I'm writing a Make clone and to stop parallel processes from thrashing each others' console output I've redirected the output to pipes (as described in here) on which I can do any filtering I want. Unfortunately long-running processes now ...

Relaunching a cocoa app

I have an application that checks its command line parameters and stores values in persistent stores. One of those is a password that I don't want sticking around for people to see with 'ps' and friends. The approach I'm currently looking at is to, after I've stored the values I need, relaunch the process without the command line param...

Linux: can I read the output of another process without using any IPC (pipes, etc.)?

Is it possible in linux to somehow read the output (from stdout and stderr) of another process without it knowing about it? So lets say I have a process A running in the background and process B wants to read its output - is it possible? I can't use pipes or the screen program. I tried reading from /proc/xxx/fd or from /pts/x consoles an...

List of PID's in Erlang

Long story short I am trying to replicate the Sleeping barber problem in Erlang. In my solution I decided that for all the processes that are waiting I would put them into a list. Then, once it was that processes turn, I would take that PID off of the list. Unfortunately when I call length(myListOfPids). it fails, as an example: ...

Programmatically remove notifcation try icon for other program

I'm trying to write a monitor app for Dream Daemon, a specific server app. Since the server app tends to crash (specifically, Dream Daemon is a server for a specific brand of interpreted code, so it's the interpreted code that's crashing, leaving DD idling). To avoid people having to manually log on and restart the thing several times ...

How do I read stdout/stderr output of a child process correctly?

I have written a program a.exe which launches another program I wrote, b.exe, using the CreateProcess function. The caller creates two pipes and passes the writing ends of both pipes to the CreateProcess as the stdout/stderr handles to use for the child process. This is virtually the same as the Creating a Child Process with Redirected I...

Detecting whether a process starts and finishes with notifications in cocoa

Hi everyone, I was wondering if there was a way that I could get notifications of when a system process from /usr/sbin starts and finishes. Is it possible to attach NSTask to the running process without launching a new one? Preferably without polling please :! ...

Starting an external process fails: cannot connect to X server

Hello, as part of my eclipse plugin I try to start an external program by using process.exec. This works with some tools (I tested it with gedit, for example), but with the one I need it does not work: isimgui: cannot connect to X server. This is part of the XILINX webpack, none of the included graphic tools can be started like this. ...

*nix System-wide threads and processes mutex

I have some resource which I'd like to protect from concurrent usage both by threads in the same process and among different processes. What is the "right" way of doing it in *nix? E.g. we want to write to a file from a multithreaded app, which once in a while forks some subprocesses. How to ensure that each thread has exclusive access ...

How to start a Process and make its main window modal to the starting process's window?

Hi, I have a C# WinForms program thats starts another Process. The program then waits until the Process has finished. Currently I use Process.WaitForExit(), but this means that while my program waits for the Process to end, it doesn't repaint and "looks" like it's not responding. Is there any way for the Window of the Process that my ...

How can I spawn a long running process in a Perl CGI script?

I'm writing a Perl CGI script right now but it's becoming a resource hog and it keeps getting killed by my web host because I keep hitting my process memory limit. I was wondering if there is a way I can split the script I have into multiple scripts and then have the first script call the next script then exit so the entire script isn't...

Run app from a service using CreateProcessAsUser

I'm still trying to run an app calling it from windows service. I tried to use the way described by Scott Allen. It works. But still I can't bring the app to the screen to interact with it. Help me pls. Even if I'm telling it to run the service using my credentials it doesn't bring the app on my desktop. tell me please how to get the cu...

Running repetitive maintenance processes on LAMP

I am developing an auction site that requires maintenance scripts to be run in the background to ensure smooth running. Things such as ending auctions, starting auctions, etc... There seem to be many options and no definite answers when I research the subject. Is there a standard for doing this sort of thing? My research so far has unc...

Two processes reading/writing to the same file Python

I have one process who's reading from a file (using file.read()) and one process who's writing to the same file (file.write()). The problem is it doesn't work - I get no errors but they can't operate at the same time. I've tried making the read and write operations none-blocking and then flushing the stream, as follows: fcntl.fcntl(file...

c code for perpetually changing center colour in xeyes(terminal)

i'm trying to write a c code which opens the xeyes application and then those eyes keep changing its color constantly for a particular eriod of time.. i tried to achieve this by executing xeyes with one center color, adding a delay of 3 seconds, killing the process, and opening xeyes with another center colour and so on inside a loop. ...

How to do background processing similar to that on stackoverflow?

I know that stackoverflow uses asp.net mvc but how they do background process (ie) processing a recent user updates,badges etc.... How to get started with background processing in asp.net mvc... ANy suggestion... I just saw jeff's post private static CacheItemRemovedCallback OnCacheRemove = null; protected void Application_Start(objec...

What is the updateShar process on os X?

What does this process do? Something is causing my MacBook Pro to hang and I'm trying to diagnose it. This is from 'top': PID COMMAND %CPU TIME #TH #PRTS #MREGS RPRVT RSHRD RSIZE VSIZE 93541 updateShar 0.0% 0:00.00 1 14 17 76K 184K 296K 9720K The VSIZE looks large. ...

Putting method calls into an ArrayList?

Hey everyone, I was adding a loading bar feature to my program in Java and I was wondering if I could set a list of processes that need to be done, so that it knows how many processes it needs to complete. For example, saving them as strings? ArrayList<String> processes = new ArrayList<String>(); processes.add("CSVWriter.createFileOfC...

c# Cannot delete log file after process stopped

I have many processes on a server which Im attempting to stop, delete the log files, and eventually restart. My problem is that once all the processes stop (even the one that writes to the log file), Im unable to programatically delete the log files (but I can manually). The error I receieve is "the process cannot access the file bec...

How to use os.spawnv to send email copy using Python?

First let me say that I know it's better to use the subprocess module, but I'm editing other people's code and I'm trying to make as few changes as possible, which includes avoiding the importing any new modules. So I'd like to stick to the currently-imported modules (os, sys, and paths) if at all possible. The code is currently (in a ...