Modified: trunk/launchd/src/launchd_core_logic.c (23931 => 23932)
--- trunk/launchd/src/launchd_core_logic.c 2009-07-03 00:13:18 UTC (rev 23931)
+++ trunk/launchd/src/launchd_core_logic.c 2009-07-24 22:46:11 UTC (rev 23932)
@@ -4655,6 +4655,8 @@
if( !si->watching_parent ) {
if (si->why == PATH_CHANGES) {
j->start_pending = true;
+ } else {
+ semaphoreitem_watch(j, si);
}
} else { /* Something happened to the parent directory. See if our target file appeared. */
if( !invalidation_reason[0] ) {
@@ -4662,6 +4664,7 @@
si->fd = -1; /* this will get fixed in semaphoreitem_watch() */
semaphoreitem_watch(j, si);
}
+ /* Need to think about what should happen if the parent directory goes invalid. */
}
job_dispatch(j, false);
@@ -5228,11 +5231,13 @@
if( si->fd != -1 && !si->watching_parent ) { /* Need to be watching the parent now. */
job_assumes(j, runtime_close(si->fd) == 0);
si->fd = -1;
+ semaphoreitem_watch(j, si);
}
} else { /* File is there but we wish it wasn't. */
if( si->fd != -1 && si->watching_parent ) { /* Need to watch the file now. */
job_assumes(j, runtime_close(si->fd) == 0);
si->fd = -1;
+ semaphoreitem_watch(j, si);
}
}
}