process

ruby list child pids

How can I get pids of all child processes which were started from ruby script? ...

Win32: How to get the process/thread that owns a mutex?

I'm working an application of which only one instance must exist at any given time. There are several possibilities to accomplish this: Check running processes for one matching our EXE's name (unreliable) Find the main window (unreliable, and I don't always have a main window) Create a mutex with a unique name (GUID) The mutex option...

Heap / Stack and multiple processes

Hi, Say I have two process p1,p2 runnning as a part of my application. Say p1 is running initially executing function f1() and then f1() calls f2().With the invocation of f2() process p2 starts excuting What I want to confirm is it that :- 1)Do we have seperate stack for different process? 2)Do we have seperate heap for different proc...

How to know a process is 32-bit or 64-bit programmatically

Hi, How do I check whether an application/process is running in 32-bit or 64-bit mode? for eg. i will start a process abc.exe. In c# how can we know whether a 32-bit abc.exe is running or a 64-bit one? please help.. It is not the current process.. I am querying for some process 'abc.exe' ...

How to I get the window handle by giving the process name that is running?

How can I get the window handle by giving the process name or window title in c#.. given the process is in running already ...

Execve problem with invoking

Why it doesn't work :( I want to simply invoke a shell in C program by execve: #include <stdio.h> #include <stdlib.h> #include <errno.h> main() { char* path = "/bin/sh"; int err = execve(path, &path, NULL); printf("%d\n", err); printf("%s\n", strerror(errno)); printf("%x, %x\n", path, &path); } ...

If 'Process.HasExited' throws an exception, can I assume that the process is gone?

I have the following code section, designed to count how many Excel processes are currently open: Func<int> OpenExcelProcessesCount = () => System.Diagnostics.Process.GetProcessesByName("Excel") .Where(p => !p.HasExited) .Count(); And then later I retrieve the count at various points, with code such as...

more info on Memory layout of an executable program (process)

I attended interview for samsung. They asked lot of questions on memory layout of the program. I barely know anything about this. I googled it "Memory layout of an executable program". "Memory layout of process". I'm surprised to see that there isn't much info on these topics. Most of the results are forum queries. I just wonder why? ...

process termination

Hello, I have 2 processes and they send UDP messeges. They don't read the messages immeditely and sometimes when they read the messages they can read a bulk of them. I saw that when one of the processes is down the other one is still getting those messages. How come ? it is down. Thanks ...

Issue with backgroundworker

could anybody knows any alternatives to progressbar? Inmy project im using progressbar..I would like to change it to something like a rotating gif image which indicates the processing or someother labels which prevents the user from interacting to the program.I tried to implement the gif image by using background worker but its hanging m...

Launch Application within an Thread, using Timer

Hi all, I'll try explain me as better possible, sorry my english. I have a Thread, within this thread I call method, which have long time process. The method has a foreach, and using counter for each iteration (counter++) I want to do this: a). Within foreach, if counter > 20: a1). Check if any proccess (which Name = "SendMailServi...

Apache Changelog: 2.2.12 and 2.2.14

Hello all, I have huge PHP script which I have been running on Apache 2.2.12 and I have recently upgraded to Apache 2.2.14. However, my PHP script doesn't work as it stops at a certain point all the time. I have been trying to work out what the difference is in these two Apache versions, I have looked at this CHANGELOG and have not been...

android finish() method doesnt clear app from memory

Hi I have an activity and I call the finish() method and the activity is not cleared from memory. After calling finish() , I see that the method onDestroy() is executed successfully (and I clear all my variables and stuff in there). Should it be cleared from memory or its how android works? As I understand the LifeCycle of the Activit...

Memory efficiency vs Processor efficiency

In general use, should I bet on memory efficiency or processor efficiency? In the end, I know that must be according to software/hardware specs. but I think there's a general rule when there's no boundaries. Example 01 (memory efficiency): int n=0; if(n < getRndNumber()) n = getRndNumber(); Example 02 (processor efficiency):...

Is there any reason to use threading.Lock over multiprocessing.Lock?

If a software project supports a version of Python that multiprocessing has been backported to, is there any reason to use threading.Lock over multiprocessing.Lock? Would a multiprocessing lock not be thread safe as well? For that matter, is there a reason to use any synchronization primitives from threading that are also in multiproce...

How can I keep Task Manager from killing my program?

Is there any way to protect my Delphi application from being killed by the Windows task manager (or others like Process Explorer)? I think Windows messages can do that (by doing a hook and intercepting the TerminateProcess message). I want an example of this protection. The Kaspersky Anti-Virus suites are like this; we can't end their ...

C# Process Monitor

Is there a way to determine when the last time a specific machine last ran a process? I can use the following to determine if a process is running, but the application cannot grab the process if it has since stopped. Process[] process = Process.GetProcessesByName(processName, serverName); (C# por favor) ...

Hide Console When Executing a TProcess

I'm building a application that uses a TProcess called AProcess like this: procedure TFormMain.btCompileClick(Sender: TObject); begin AProcess := TProcess.Create(nil); try AProcess.CommandLine := 'gcc.exe "' + OpenDialog1.FileName + '"' + ' -o "' + OpenDialog2.FileName + '"'; AProcess.Options := AProcess.Options + [poW...

Sample a process on Mac OS X from a C/C++ program

The Sample Process feature in Activity Monitor is quite a useful thing. However, I need to do the same thing (take samples) of a certain process from another running process (C/C++) or a command line. Is there any way to do this? I have been googling for this since a few days without any luck. ...

Linux i/o to running deamon / process

Is it possible to i/o to a running process? I have multiple game servers running like this: cd /path/to/game/server/binary ./binary arg1 arg2 ... argn & Is it possible to write a message to a server if i know the process id? Something like this would be handy: echo "quit" > process1234 Where process1234 is the process (with sid 12...