process

Is it possible to kill a C++ application on Windows XP without unwinding the call stack?

微笑、不失礼 提交于 2020-01-15 02:39:19
问题 My understanding is that when you kill a C++ application through Task Manager in Windows XP, the application is still "cleanly" destructed - i.e. the call stack will unwind and all the relevant object destructors will be invoked. Not sure if my understanding is wrong here. Is it possible to kill such an application immediately, without unwinding the stack? For example, the application may employ RAII patterns which will destroy or release resources when an object is destructed. If the

erlang processes and message passing architecture

本小妞迷上赌 提交于 2020-01-14 22:53:52
问题 The task I have in hand is to read the lines of large file, process them, and return ordered results. My algorithm is: start with master process that will evaluate the workload (written in the first line of the file) spawn worker processes: each worker will read part of the file using pread/3, process this part, and send results to master master receives all sub-results, sort, and return so basically no communication needed between workers. My questions: How to find the optimal balance

How do i find pixels points inside quadrilateral using Java?

回眸只為那壹抹淺笑 提交于 2020-01-14 19:24:26
问题 Im doing some image processing and I have the coordinates of the 4 points of a quadrilateral. (something like a trapezium) How can i get the coordinates of all the pixels inside it? I'm using Java by the way. Thanks! 回答1: You need scanline polygon filling. Here's a quick PDF lecture on the subject: http://www.cs.binghamton.edu/~reckert/460/lect11_2009-areafill-transformations.pdf Here's a web page example with some sample C code and a good illustration of the basic idea: http://alienryderflex

android.os.Process.killProcess(pid) did restart the processes again

断了今生、忘了曾经 提交于 2020-01-14 14:42:27
问题 killprocess method does kill the processes but why the processes restart again and what is suppose to do for not restarting the process again. Here goes my code. ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); List<RunningAppProcessInfo> services = manager.getRunningAppProcesses(); for (RunningAppProcessInfo info : services) { int service1name = info.pid; android.os.Process.killProcess(service1name); } Thanks for your concern. 回答1: Actually the process

Can a child process go <defunct> without its parent process dying?

为君一笑 提交于 2020-01-14 12:37:00
问题 kill - does it kill the process right away? I found my answer and I set up a signal handler for SIGCHLD and introduced wait in that handler. That way, whenever parent process kill s a child process, this handler is called and it calls wait to reap the child. - motive is to clear process table entry. I am still seeing some child processes going for a few seconds even without its parent process dying. - how is this possible? I am seeing this via ps . Precisely ps -o user,pid,ppid,command -ax

Can a child process go <defunct> without its parent process dying?

ぐ巨炮叔叔 提交于 2020-01-14 12:36:40
问题 kill - does it kill the process right away? I found my answer and I set up a signal handler for SIGCHLD and introduced wait in that handler. That way, whenever parent process kill s a child process, this handler is called and it calls wait to reap the child. - motive is to clear process table entry. I am still seeing some child processes going for a few seconds even without its parent process dying. - how is this possible? I am seeing this via ps . Precisely ps -o user,pid,ppid,command -ax

How to get pid of process executed with system() command in c++

末鹿安然 提交于 2020-01-14 09:14:25
问题 When we use system() command, program wait until it complete but I am executing a process using system() and using load balance server due to which program comes to next line just after executing system command. Please note that that process may not be complete. system("./my_script"); // after this I want to see whether it is complete or not using its pid. // But how do i Know PID? IsScriptExecutionComplete(); 回答1: Simple answer: you can't. The purpose of system() is to block when command is

Alarm in the AlarmManager get erased when process is killed

[亡魂溺海] 提交于 2020-01-14 09:00:35
问题 I'm a newbie in android so please bear with me. My Main activity creates and alarm in the alarm manager which supposed to fire in specific time, my main Activity also create Broadcast receiver which suppose to receive the Intent that the alarm fired, everything is working good until Task manager killing my App. I've check the PendingIntent list in the AlarmManager and verify that my alarm is getting erased from the Alarm Manager, I try to add service and register alarm from the service, I've

Deallocate resources on process termination

你说的曾经没有我的故事 提交于 2020-01-14 08:30:13
问题 How I can deallocate resources when the process gets killed by, for example, the Task Manager? Is there a way to call a function before the process gets closed? 回答1: There really is nothing you can do if your process is killed. By definition, killing a process is just that - killing it. The process does not get an opportunity to run any code. This is very much "by design". Imagine that you could register a routine that was called when your process was killed by the user (or by another process

Deallocate resources on process termination

萝らか妹 提交于 2020-01-14 08:29:07
问题 How I can deallocate resources when the process gets killed by, for example, the Task Manager? Is there a way to call a function before the process gets closed? 回答1: There really is nothing you can do if your process is killed. By definition, killing a process is just that - killing it. The process does not get an opportunity to run any code. This is very much "by design". Imagine that you could register a routine that was called when your process was killed by the user (or by another process