I want to write a program, that should be notified by O.S. whenever any running process on that OS dies.
I don't want to myself poll and compare everytime if a previously existing process has died. I want my program to be alerted by OS whenever a process termination happens.
How do I go about it? Some sample code would be very helpful...
I have a program that has to perform certain tasks before it finishes. The problem is that sometimes the program crashes with an exception (like database cannot be reached, etc).
Now, is there any way to detect an abnormal termination and execute some code before it dies?
Thanks.
code is appreciated.
...
I need help with the code below.
I try to convert a AutoCAD file from the format dwg to the format dwf.
Then, the dwf file is downloaded and opened on the client computer using a java applet.
The command used to convert the dwg file on the command-line is:
C:\inetpub\wwwroot\COR-Basic\cadviewer\converter\ax2008.exe -i="C:\inetpub\wwwroo...
Just what the title says:
The subprocess module cannot be used as this should work on 2.4 and 2.5
Shell process should not be spawned to pass arguments.
To explain (2), consider the following code:
>>> x=os.system('foo arg')
sh: foo: not found
>>> x=os.popen('foo arg')
sh: foo: not found
>>>
As you can see os.system and os.popen r...
hello,
I want to start a number of subprocesses in my Python script and then track when they complete or crash.
subprocess.Popen.poll() seems to return None when the process is still running, 0 on success, and non-zero on failure. Can that be expected on all OS's?
Unfortunately the standard library documentation is lacking for these me...
We're looking to start a code-review process for a group of ~30 coders who are all relatively junior programmers.
What is your advice on how to train for code reviews? Are there code review pitfalls to be avoided? Essential things to look for?
...
Using Process Explorer (procexp.exe), especially with Google Chrome, child processes are called a Job. Same with Internet Explorer 8, but I noticed it first with Chrome.
What is a Job
What should I know about these things?
Why would (you|one) use them?
What scenarios should they be used?
What APIs are used.
I know the questions is a ...
Hi,
i want to execute a setup.exe installer which installes a software on vista with java 1.6.
The user is not an administrator. When i try to start the process i get the error message:
CreateProcess error=740
which indicates, that the user has not enough rights for starting the process.
Can i submit a flag or an option to indicat...
I'm trying to launch & control UI automation tool through PHP. I'm able to launch the tool using proc-open but it launches the process in background hence the application doesn't appear on the screen. I'm using proc-open so that I could capture exit status of the application. Please let me know if there is a way to launch and control app...
I'm embedding Python interpreter to a C program. However, it might happen that while running some python script via PyRun_SimpleString() will run into infinite loop or execute for too long. Consider PyRun_SimpleString("while 1: pass"); In preventing the main program to block I thought I could run the interpreter in a thread.
How do I st...
Hi,
i need to use bash shell "inside" C# program. I want to mimic user typing in interactive mode and running cygwin commands.
i created a process that runs bash and redirect stdin,stout and std error but i can;t get tty to work attached is a sample code that starts bash process and redirect the input/output.
the problem is that i don...
I was wondering if I could process an URL without specifing parameters. For example:
http://www.example.com/Sometext_I_want_to_process
I don't want to use: http://www.example.com/index.php?text=Sometext_I_want_to_process
The site has to redirect to a different page after processing.
What language choice do I have?
...
The Personal Software Process (PSP) is designed to allow software engineers to understand and improve their performance. The PSP uses scripts to guide a practitioner through the process. Each script defines the purpose, the entry criteria, the steps to perform, and the exit criteria. PSP0 is designed to be a framework that allows for sta...
Hi Guys
I have an application that, when run, does the following:
Check current user is MicaUser
Start Application under MicaUser using Process.Start()
Exit
This works fine on my Vista Dev machine, but when i try to run it under a restricted account in XP, i get the following error:
"The trust relationship between this workstation a...
We are having to read text off of an existing VB6 application. So we use the methods FindWindow, GetWindowText, and EnumChildWindows out of kernel32 and can enumerate and read the displayed text in this process.
We are able to read 90% of the text with our method, but there is a specific control (or box) in general that we cannot read....
Based on the different views documented in SAD which RUP roles should should be responsible for creating the SAD? I thought from the beginning that the SAD was only for a technical audience but from what i can see in RUP it is more than that so it seems like it is not only the Software Architect that should be involved.
...
I am executing another JVM (java.exe) from the main application. Is there any way to share an object (rather large object) with the newly created process (at the time of creation or after it was created).
someObject sO= new someObject();
//sO is populated
//Creating new process
Runtime rt = Runtime.getRuntime();
Process proc = rt.exe...
I then to tar and then gzip a list of files in C#.
I need some help with how to set the arguments to tar.
Say I have tar.exe in a folder c:\tar\tar.exe and a method like the following:
private void RunTar(string outputFileName, List<string> fileNamePaths)
{
using (Process p = new Process())
{
p.Star...
Hi community,
After having used an application for over 10 years, and been constantly limited by its lack of extensibility, we have decided to rewrite it fully from scratch. Because the new architecture differs from the old application, the database is also different. Here comes the problem: Is there any industrial process for migrating...
We have to run a process from a windows service and get a screenshot from it.
We tried the BitBlt and PrintWindow Win32 calls, but both give blank (black) bitmaps.
If we run our code from a normal user process, it works just fine.
Is this something that is even possible? Or could there be another method to try?
Things we tried:
Wi...