InotifySource: use the SocketMonitor class

This commit is contained in:
Max Kellermann
2013-01-15 18:18:02 +01:00
parent 2101daef5a
commit 7071126770
5 changed files with 29 additions and 43 deletions

View File

@@ -61,7 +61,10 @@ int main(int argc, char **argv)
path = argv[1];
InotifySource *source = InotifySource::Create(my_inotify_callback,
event_loop = new EventLoop(EventLoop::Default());
InotifySource *source = InotifySource::Create(*event_loop,
my_inotify_callback,
nullptr, &error);
if (source == NULL) {
g_warning("%s", error->message);
@@ -77,8 +80,6 @@ int main(int argc, char **argv)
return 2;
}
event_loop = new EventLoop(EventLoop::Default());
struct sigaction sa;
sa.sa_flags = 0;
sigemptyset(&sa.sa_mask);