~ps-jenkins/mediascanner2/trusty-proposed

« back to all changes in this revision

Viewing changes to src/daemon/SubtreeWatcher.cc

  • Committer: CI bot
  • Author(s): Jussi Pakkanen
  • Date: 2014-03-14 15:16:45 UTC
  • mfrom: (214.1.1 mediascanner)
  • Revision ID: ps-jenkins@lists.canonical.com-20140314151645-mx1d6hwc0tkirwpo
Keep going if inotify watch creation fails. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
            IN_CREATE | IN_DELETE_SELF | IN_DELETE | IN_CLOSE_WRITE |
106
106
            IN_MOVED_FROM | IN_MOVED_TO | IN_ONLYDIR);
107
107
    if(wd == -1) {
108
 
        string msg("Could not create inotify watch object: ");
109
 
        msg += strerror(errno);
110
 
        throw runtime_error(msg);
 
108
        fprintf(stderr, "Could not create inotify watch object: %s\n", strerror(errno));
 
109
        return; // Probably ran out of watches, keep monitoring what we can.
111
110
    }
112
111
    p->wd2str[wd] = root;
113
112
    p->str2wd[root] = wd;