From: Enlightenment S. <no-...@en...> - 2012-12-01 00:01:32
|
Log: more exception checks (still a bug when multible processes are running) Author: andreas Date: 2012-11-30 16:01:24 -0800 (Fri, 30 Nov 2012) New Revision: 79955 Trac: http://trac.enlightenment.org/e/changeset/79955 Modified: trunk/BINDINGS/cxx/ecorexx/include/ecorexx/Exe.h trunk/BINDINGS/cxx/ecorexx/src/Exe.cpp Modified: trunk/BINDINGS/cxx/ecorexx/include/ecorexx/Exe.h =================================================================== --- trunk/BINDINGS/cxx/ecorexx/include/ecorexx/Exe.h 2012-11-30 23:55:39 UTC (rev 79954) +++ trunk/BINDINGS/cxx/ecorexx/include/ecorexx/Exe.h 2012-12-01 00:01:24 UTC (rev 79955) @@ -87,6 +87,8 @@ Exe(const Exe&); // forbid copy constructor static Eina_Bool delhandler (void *data, int type, void *event); + + void exceptionCheck(); Ecore_Exe *mExe; Modified: trunk/BINDINGS/cxx/ecorexx/src/Exe.cpp =================================================================== --- trunk/BINDINGS/cxx/ecorexx/src/Exe.cpp 2012-11-30 23:55:39 UTC (rev 79954) +++ trunk/BINDINGS/cxx/ecorexx/src/Exe.cpp 2012-12-01 00:01:24 UTC (rev 79955) @@ -80,18 +80,19 @@ bool Exe::send(const void *data, int size) { - - + exceptionCheck(); return ecore_exe_send(mExe, data, size); } void Exe::stdinClose() { + exceptionCheck(); ecore_exe_close_stdin(mExe); } void Exe::setAutoLimits(int start_bytes, int end_bytes, int start_lines, int end_lines) { + exceptionCheck(); ecore_exe_auto_limits_set(mExe, start_bytes, end_bytes, start_lines, end_lines); } @@ -102,83 +103,101 @@ pid_t Exe::getPid() { + exceptionCheck(); return ecore_exe_pid_get(mExe); } void Exe::setTag(const std::string &tag) { + exceptionCheck(); ecore_exe_tag_set(mExe, tag.c_str()); } std::string Exe::getTag() { + exceptionCheck(); return ecore_exe_tag_get(mExe); } std::string Exe::getCmd() { + exceptionCheck(); return ecore_exe_cmd_get(mExe); } void *Exe::getData() { + exceptionCheck(); return ecore_exe_data_get(mExe); } void *Exe::setData(void *data) { + exceptionCheck(); return ecore_exe_data_set(mExe, data); } Ecore_Exe_Flags Exe::getFlags() { + exceptionCheck(); return ecore_exe_flags_get(mExe); } void Exe::pause() { + exceptionCheck(); ecore_exe_pause(mExe); } void Exe::cont() { + exceptionCheck(); ecore_exe_continue(mExe); } void Exe::interrupt() { + exceptionCheck(); ecore_exe_interrupt(mExe); } void Exe::quit() { + exceptionCheck(); ecore_exe_quit(mExe); } void Exe::terminate() { + exceptionCheck(); ecore_exe_terminate(mExe); } void Exe::kill() { - if (!mExe) - { - assert(mDeathPid); - throw ProcessNotExistingException(mDeathPid); - } - + exceptionCheck(); ecore_exe_kill(mExe); } void Exe::signal(int num) { + exceptionCheck(); ecore_exe_signal(mExe, num); } void Exe::hup() { + exceptionCheck(); ecore_exe_hup(mExe); } +void Exe::exceptionCheck() +{ + if (!mExe) + { + assert(mDeathPid); + throw ProcessNotExistingException(mDeathPid); + } +} + } // end namespace Ecorexx |