Guest User

Untitled

a guest
Aug 17th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. inotify inotify_event event->name is empty
  2. fd = inotify_init();
  3. wd = inotify_add_watch (m_fd, "/tmp/myfile", IN_MODIFY | IN_CREATE | IN_DELETE);
  4. wd1 = inotify_add_watch (m_fd, "/tmp/myfile2", IN_MODIFY | IN_CREATE | IN_DELETE);
  5. -----
  6. unsigned char buffer[BUFFER_SIZE];
  7.  
  8. ssize_t len = ACE_OS::read(fd, buffer, sizeof(buffer));
  9. ssize_t i = 0;
  10.  
  11. while (i < len)
  12. {
  13. inotify_event *event = ( struct inotify_event * ) &buffer[ i ];
  14. i += EVENT_SIZE + event->len;
  15. }
Add Comment
Please, Sign In to add comment