00001 /* 00002 * PROPRIETARY INFORMATION. This software is proprietary to 00003 * Side Effects Software Inc., and is not to be reproduced, 00004 * transmitted, or disclosed in any way without written permission. 00005 * 00006 * Produced by: 00007 * Mark Alexander 00008 * Side Effects Software Inc 00009 * 477 Richmond Street West 00010 * Toronto, Ontario 00011 * Canada M5V 3E7 00012 * 416-504-9876 00013 * 00014 * NAME: UT_ChildProcessTracker.h ( UT Library, C++) 00015 * 00016 * COMMENTS: 00017 * For child processes that have an indeterminant exit time (like a 00018 * spawned viewer), this class will periodically do a non-blocking wait on 00019 * them. 00020 * 00021 */ 00022 #ifndef UT_CHILD_PROCESS_TRACKER_H 00023 #define UT_CHILD_PROCESS_TRACKER_H 00024 00025 #include "UT_API.h" 00026 #include <SYS/SYS_Types.h> 00027 #include "UT_Defines.h" 00028 00029 class UT_API UT_ChildProcessTracker 00030 { 00031 public: 00032 UT_ChildProcessTracker(); 00033 virtual ~UT_ChildProcessTracker(); 00034 00035 virtual void addNewChild(pid_t pid); 00036 virtual bool pollChildren(); 00037 00038 protected: 00039 int myNumPIDs; 00040 pid_t *myPIDs; 00041 }; 00042 00043 UT_API extern void UTsetChildProcessTracker(UT_ChildProcessTracker *); 00044 UT_API extern UT_ChildProcessTracker *UTgetChildProcessTracker(); 00045 00046 #endif
1.5.9