Re: [Dpcl-user] Welcome to the "Dpcl-develop" mailing list
Brought to you by:
dpcl-admin,
dwootton
|
From: Dave W. <dwo...@us...> - 2006-07-31 14:51:09
|
Hi DPCL does not provide any way to obtain process exit status for processes that it attaches to, so would not work for what you propose. DPCL is also probably far too 'heavyweight' for using just as a process termination monitor since when DPCL attaches to a process, it parses the executable looking for symbol table information and builds data structures in memory representing the structure of each process that it loads. You might be able to accomplish what you want by using ptrace to attach to each process, assuming that you have permission to attach to those processes (your userid owns the process or your userid is root). Once you attach, you need to resume execution, then write code which polls for exit status when your process is notified that one of the processes you connected to via ptrace has terminated. Dave Sasidhar Palaka <psa...@gm...> Sent by: dpc...@li... 07/30/2006 10:32 AM To dpc...@li... cc Subject Re: [Dpcl-user] Welcome to the "Dpcl-develop" mailing list Hi all, Context: I am building a monitoring tool that will monitor a set of processes (list of processes from a config file). I am interested in knowing the exit status of each of these processes the system monitors. Depending on the exit status (and signals, if any, that caused the exit), the tool will take further action. One approach: I am thinking of opening a pipe to "truss" (or its variants) for each of processes to be monitored and look for the exit status. Is there a better way to simulate a "silent attachment to a running process" to be notified of the exit status? Could DPCL help in any fashion? Thanks, Sasi. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Dpcl-user mailing list Dpc...@li... https://lists.sourceforge.net/lists/listinfo/dpcl-user |