processes

What are the behavioral differences between a daemon and a normal process?

I know that daemons run in the background mostly i.e. they require very less interaction from the user. Wikipedia lists some of the types of daemons that commonly exist: Dissociating from the controlling tty Becoming a session leader Becoming a process group leader Staying in the background by forking and exiting (once or twice). This...

Advice on backgrounding a task with variables?

I have a python webapp which accepts some data via POST. The method which is called can take a while to complete (30-60s), so I would like to "background" the method so I can respond to the user with a "processing" message. The data is quite sensitive, so I'd prefer not to use any queue-based solutions. I also want to ensure that the b...

C++ game trainer process monitoring

I am going to open game process from my trainer app and write some values to memory. I have no problems with opening a process and writing a value to memory. But I can't realize how to monitor the game process availability. For example I opened a running process, user closed it and opened again. How can I track this in my code? OpenProce...

Django - Ajax HttpResponse delay

I have a django view function that calls another function if a condition is true, the function is called as a separate process, the view returns a status variable which shows if the function was called or not, the status is returned to a ajax click event assigned to a button. The problem is that when the function 'do_work' is executed aj...

Memory Optimization for child processes

I work on Linux for ARM processor for cable modem. There is a tool that I have written (as the job demands) that sends/storms customized UDP packets using raw sockets. I form the packet from scratch so that we have the flexibility to play with different options. This tool is mainly for stress testing routers. The details are here. I ac...

windows application that launch out of browser silverlight application and do other work

i wanna create an exe that check the running processes on the windows and launch my xap file i wanna close it if another software was running I read the silent install scripts but yet still confused how can i use them examples will be appreciated Thanx ...

How do I know when a child process died?

In my class I run 4 process. from multiprocessing import Process procs = ( Process(target=ClassOne, name='ClassOne'), Process(target=ClassTwo, name='ClassTwo'), Process(target=ClassThree, name='ClassThree'), Process(target=ClassFour, name='ClassFour'), ) for p in...

How to find out when process exits in Linux?

I can't find a good way to find out when a process exits in Linux. Does anyone have a solution for that? One that I can think of is check process list periodically, but that is not instant and pretty expensive (have to loop over all processes each time). Is there an interface for doing that on Linux? Something like waitpid, except some...

Threads, processes and Application.Exit()

My application consists of main message loop (GUI) and threads (Task.Factory). In the threads I call some 3rd party applications with var p = new Process(); But when I invoke Application.Exit(); in the message loop - I can see that the processes, that were started in the threads are still in the memory and are being executed. So the q...

MySQL Strange behavior. I see slow query causing # of processes shrink and back up.

I have just moved the web application into a new web server and new DB server. With the latest version of everything. However, when I run the application in live (with over 1000 users), I observe that every 2-3 minutes, there are slow query report. And when this happened, the php processes ( use 'top') shrink from 30 processes to a fe...

What is happening to my process?

Hello, I'm executing a SSH process like so: checkIn() sshproc = subprocess.Popen([command], shell=True) exit = os.waitpid(sshproc.pid, 0)[1] checkOut() Its important that the process form checkIn() and checkOut() actions before and after these lines of code. I have a test case that involves that I exit the SSH session by closing the...

c# run 2 (or more) process in diffirent timing?

Hello, how to run different tasks in different process? in my case I will have 2 tasks one runs every 1 mint the other will run every 10 mints the point is each one is totally independent from the other how to make them work within the same program? cheers ...

Problem with using open4 in Ruby.

I have a script I want to execute with open4. Here is the file: script #!/usr/bin/env ruby print "Enter your username: " username = gets puts "Here is your username: #{username}" print "Enter your password: " password = gets puts "Here is your password: #{password}" Then I fire up IRB and type: ruby-1.9.2-p0 > pid, stdin, stdout, s...

Significance of Sleep(0)

I used to see Sleep(0) in some part of my code where some infinite/long while loops are available. I was informed that it would make the time-slice available for other waiting processes. Is this true? Is there any significance for Sleep(0)? Thanks. ...

Using NSWorkspace to get all running processes

Hello. I want to get list of all running processes in MacOs. When I use [myWorkspace runningApplications]; I get only list of current user Applications. How I can find out list of all processes, with root or mysql owner. ...

What happens to open file handles after an execv call? (C++)

Hi, On Linux, I have some C++ code where I want to execv another application. That program outputs some data to the stderr. I therefore redirect the stderr by calling freopen() with stderr as the stream parameter. The thing is, I want to redirect the stderr for another process that is run. Here is the scenario I am working with. I ...

I am a process, how much CPU do I consume?

Is there a way (.net 2.0) for a process to know EXACT amount of processor usage it consumes (something like it would be seen in processexplorer properties/performance graph). Please, don't go much further then semi-esoteric questions (p-Invoke OK) Also, so I don't open yet another question - how can I (as a process) control my own affi...

In *nix, what causes "sleeping" in top command?

What causes these sleeping processes that I see in top? If I were to call PHP's sleep() function, would that add to the sleeping count I see in top? Are there any disadvantages to having a high number in sleeping? ...

Grepping for Python processes

I'm running a script that executes either: ./ide.py # or python ./ide.py After that I use pstree -p | grep ide.py to check, but I only found a Python process. If I have many Python scripts running, how can I distinguish them from each other? ...

what process lock a file

trying to figure out what progress lock a file using the class below. can anyone explain whats going wrong here. call: private void button1_Click(object sender, EventArgs e) { Console.WriteLine(Win32Processes.GetProcessesLockingFile("locked_file.dll").ToString()); } output: System.Collections.Generic.List`1[System.Diagnostics.Pr...