Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
6ea72eed
Commit
6ea72eed
authored
9 years ago
by
Martin Karlgren
Browse files
Options
Downloads
Patches
Plain Diff
Filesystem.Monitor: Let inotify monitors fallback to poll if file doesn't exist.
parent
5904b613
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike
+5
-2
5 additions, 2 deletions
lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike
with
5 additions
and
2 deletions
lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike
+
5
−
2
View file @
6ea72eed
...
...
@@ -979,6 +979,7 @@ protected class InotifyMonitor
}
Stdio.Stat st = file_stat (path, 1);
mixed err;
if (st && st->isdir) {
// Note: We only want to add watchers on directories. File
// notifications will take place on the directory watch
...
...
@@ -986,7 +987,7 @@ protected class InotifyMonitor
// on individual files is handled in the inotify_event
// callback.
if (
mixed
err = catch {
if (err = catch {
int new_wd = instance->add_watch(path,
System.Inotify.IN_MOVED_FROM |
System.Inotify.IN_UNMOUNT |
...
...
@@ -1021,7 +1022,9 @@ protected class InotifyMonitor
}
}
return;
if (st && !err)
return; // Return early if setup was successful, i.e. avoid
// registering a polling monitor.
#endif /* !INHIBIT_INOTIFY_MONITOR */
MON_WERR("Registering %O for polling.\n", path);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment