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...
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...
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...
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...
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...
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
...
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...
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...
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...
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...
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...
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
...
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...
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.
...
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.
...
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 ...
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...
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?
...
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?
...
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...