[Jsmooth-cvs] jsmooth/skeletons/util-core Process.cpp, 1.1, 1.2 Process.h, 1.1, 1.2
Status: Beta
Brought to you by:
reyes
From: Rodrigo R. <re...@us...> - 2007-05-01 19:40:21
|
Update of /cvsroot/jsmooth/jsmooth/skeletons/util-core In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv9102/util-core Modified Files: Process.cpp Process.h Log Message: adds exit code propagation when exe-run Index: Process.h =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/util-core/Process.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Process.h 28 Apr 2007 08:47:57 -0000 1.1 --- Process.h 1 May 2007 19:40:16 -0000 1.2 *************** *** 44,47 **** --- 44,48 ---- bool m_redirectstderr; HANDLE m_redirectHandle; + DWORD m_exitCode; public: *************** *** 53,56 **** --- 54,58 ---- void join(); + int getExitCode(); }; Index: Process.cpp =================================================================== RCS file: /cvsroot/jsmooth/jsmooth/skeletons/util-core/Process.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Process.cpp 28 Apr 2007 08:47:57 -0000 1.1 --- Process.cpp 1 May 2007 19:40:16 -0000 1.2 *************** *** 83,87 **** NULL, NULL, inheritsHandle, creationFlags, NULL, NULL, &info, &m_procinfo); ! if (res != 0) { --- 83,87 ---- NULL, NULL, inheritsHandle, creationFlags, NULL, NULL, &info, &m_procinfo); ! if (res != 0) { *************** *** 106,107 **** --- 106,115 ---- } + + int Process::getExitCode() + { + GetExitCodeProcess(m_procinfo.hProcess, + &m_exitCode); + return (int)m_exitCode; + } + |