return check
This commit is contained in:
parent
e23c8c4750
commit
c505052353
3 changed files with 22 additions and 4 deletions
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue