Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
inotify: change to proper fd shutdown sequence (clang sanitizer)
  • Loading branch information
perexg committed Mar 10, 2016
1 parent d6581a2 commit eadfaab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/dvr/dvr_inotify.c
Expand Up @@ -85,11 +85,11 @@ void dvr_inotify_init ( void )
*/
void dvr_inotify_done ( void )
{
int fd = _inot_fd;
_inot_fd = -1;
close(fd);
shutdown(_inot_fd, SHUT_RDWR);
pthread_kill(dvr_inotify_tid, SIGTERM);
pthread_join(dvr_inotify_tid, NULL);
close(_inot_fd);
_inot_fd = -1;
SKEL_FREE(dvr_inotify_entry_skel);
}

Expand Down
6 changes: 3 additions & 3 deletions src/fsmonitor.c
Expand Up @@ -115,11 +115,11 @@ fsmonitor_init ( void )
void
fsmonitor_done ( void )
{
int fd = fsmonitor_fd;
fsmonitor_fd = -1;
close(fd);
shutdown(fsmonitor_fd, SHUT_RDWR);
pthread_kill(fsmonitor_tid, SIGTERM);
pthread_join(fsmonitor_tid, NULL);
close(fsmonitor_fd);
fsmonitor_fd = -1;
}

/*
Expand Down

0 comments on commit eadfaab

Please sign in to comment.