process

Using subprocess to find out when a process ends

I wish to sequentially run some c scripts that fork their own processes (in a new command line window) and give the "Press any key to continue..." when they are completed. Technically, it is a special compiler. It pops up with acommand line window and tells me whether the compile was successful or not. But that command line window for...

How to get Currently logged user's session ID?

I'm running a process from inside a windows service using ProcessStartInfo processStartInfo = new .... Process.Start(processStartInfo); The problem is, if I run service under local system account, it runs alright, but it doesn't show the programs' window. I've tried to put user credentials in service properties, but then 'Allow serv...

Is there anyway to specify a PrintTo printer when spawning a process?

What I Have I am currently writing a program which takes a specified file and the performs some action with it. Currently it opens it, and/or attaches it to an email and mails it to specified addresses. The file can either be of the formats: Excel, Excel Report, Word, or PDF. What I am currently doing is spawning a process with the pa...

How to specify a CPU core to run a program in Linux

I need to run two programs on the same core of a CPU. The second one always runs on another core because the first program uses 50% of the first core. How can I force Linux to run a program on a core? ...

Distinguishing development iPhone app versions

I like to keep a store-bought version of my iPhone apps on my phone so that I can reproduce any customer issues that come up, but I obviously also want to run the most current development version. I can install both (one from iTunes, one from xCode) but I'm interested in ways that I'm better able to tell the two apart. I could just chang...

How To Stop A Process

I'm trying to build an app that when an unhandled exception occurs, it will stop and restart itself. I have the restart code working correctly, but now I can't get it to stop. Is there any windows function to stop this process? ...

Monitor Process in Python?

I think this is a pretty basic question, but here it is anyway. I need to write a python script that checks to make sure a process, say notepad.exe, is running. If the process is running, do nothing. If it is not, start it. How would this be done. I am using Python 2.6 on Windows XP ...

Should I be worried about the order, in which processes in a process goup receive signals?

I want to terminate a process group by sending SIGTERM to processes within it. This can be accomplished via the kill command, but the manuals I found provide few details about how exactly it works: int kill(pid_t pid, int sig); ... If pid is less than -1, then sig is sent to every process in the process group whose ID is ...

How do you write quality code under duress?

Possible Duplicate: How do you manage to write high quality code very quickly? When emergency code fixes are required ASAP, how do you ensure that the code you're writing is better than the code you replaced? What processes do you keep when time is of the essence? ...

Process closing

Hello, can I use Popen from python subprocess to close started process? For example, from popen I run some application. In some part of my code I have to close that ran app. For example, from console in Linux I do: ./some_bin ... It works and logs stdout here ... Ctrl + C and it breaks I need something like Ctrl + C but in my program ...

Python2.7 Active Console to Prevent Deadlock?

I noticed an interesting behavior for my system on Windows XP To debug my system, I used cmd console to start the server xProcess = subprocess.Popen(args='Python.exe ClntMgrSvrFact.py', creationflags=CreationFlags|win32con.CREATE_NEW_CONSOLE) For each client(MSExcel) connected via TCP/IP, server factory will spawn a new process using...

VB.Net 3.5 Windows - How to get process User Object count

Hi, Can any one please advise me how I can get the current count of "USER Object"s (as shown in task manager) for the current process. I see how to get the handle count using: Process.GetCurrentProcess.HandleCount But our application can reach a USER Object count of 10,000 just by opening 17 instances of a particular form so we wou...

Building an application to do a task periodically on a server

I'm looking for some guidance on the overall architecture of this little system I'm building. Currently, I have an app that is deployed (and updated) via xcopy to a few servers. This works well for updating the code, but it does not work well for updating the period of the code's execution, since it is setup as a windows scheduled task ...

How can I dump (in Windows) the memory space used by a DLL?

Hello, I can readily dump the entire memory space of a process using various tools. But is it possible to dump just the memory space used by a DLL loaded by some process? What tools should I use? Thanks, Jim ...

How can I wait until a Windows process, and its subprocesses, have all exited?

We have a launcher app that does some setup (starting a server), launches a child process, waits (via a worker thread) for the child process to exit, and then does some cleanup (stopping the server). This is already in place and works fine. However, some of our apps can launch other apps. So for example, the launcher might start app A, ...

Python Popen.waitpid returns "[Errno 10] No child processes"

I have a working Python script that executes an external command and calls Popen.communicate(). However when I call this script from a C process, it fails in os.waitpid() with "[Errno 10] No child processes". Why? This looks like a certain bug in Python, but I'm not using threads. The C process forks, changes its UID, GID, and calls se...

How terminate child processes when parent process terminated in C#

Task: Auto kill all child processes if parent process terminate. Parent procees can be terminated not only in correct way, but also by killing in ProcessExplorer, for example. How can I do it? Similar question in С topic advice to use Job objects. How to use it in C# without exporting external DLL? I tried to use Job Objects. But th...

C# - Process.Start a ClickOnce application? What URL?

Hi I'm 3-months new to WPF and trying to build a launchy app for fun (app launcher type thingie by name). I can't seem to launch ClickOnce applications by Process name. In other words: Process.Start("Firefox"); // will work Process.Start("MetroTwit"); // a ClickOnce app - will NOT work I've read that you should be calling it by U...

Android: Howto kill my own Activity - the hard way

So I have my Activity, and on pressing a "Quit" button I call Activity.finish(). This effectively closes my application. The problem: The Dalvik-process of my application is still hanging around as a zombie in background. It seems like this is normal as other applications do the same. Even The hello-world example hangs around in memory....

Wait for WPF app to load after starting with Process.Start()

I have a WinForms app that starts a wpf process running using Process.Start. I would like to know when the WPF process is finished loading and I can access the process.MainWindowHandle property (its 0 before its completly loaded). I tried polling but the handle is always 0. However, if I debug and wait (after Process.Start) for the ...