Changeset 496 for trunk/src/sh_inotify.c


Ignore:
Timestamp:
Dec 7, 2015, 7:04:28 PM (9 years ago)
Author:
katerina
Message:

Fix for ticket #393 (wrong policy assigned).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_inotify.c

    r481 r496  
    427427}
    428428
    429 
     429void sh_inotify_close()
     430{
     431  int     ifd = sh_inotify_getfd();
     432
     433  if (ifd >= 0)
     434    close(ifd);
     435  sh_set_inotify_fd(-1);
     436
     437  return;
     438}
     439
     440 
    430441/* This function removes all watches from the list,
    431442 * and closes the inode file descriptor in this thread.
     
    433444void sh_inotify_remove(sh_watches * watches)
    434445{
    435   int     ifd = sh_inotify_getfd();
    436446  zAVLTree   * all_watches;
    437447
     
    446456  SH_MUTEX_UNLOCK(mutex_watches);
    447457
    448   if (ifd >= 0)
    449     close(ifd);
    450   sh_set_inotify_fd(-1);
    451 
     458  sh_inotify_close();
    452459  return;
    453460}
Note: See TracChangeset for help on using the changeset viewer.