return check

This commit is contained in:
Andreas Volz 2009-12-01 23:31:49 +01:00
parent e23c8c4750
commit c505052353
3 changed files with 22 additions and 4 deletions

View file

@ -33,6 +33,7 @@
#include <sys/poll.h>
#include <dbus/dbus.h>
#include <errno.h>
using namespace DBus;
@ -87,7 +88,10 @@ void BusDispatcher::enter()
void BusDispatcher::leave()
{
_running = false;
write(_fdunlock[1],"exit",strlen("exit"));
int ret = write(_fdunlock[1],"exit",strlen("exit"));
if (ret == -1) throw Error("WriteError:errno", toString(errno).c_str());
close(_fdunlock[1]);
close(_fdunlock[0]);
}