[23932] trunk/launchd/src/launchd_core_logic.c
Revision: 23932 http://trac.macosforge.org/projects/launchd/changeset/23932 Author: dsorresso@apple.com Date: 2009-07-24 15:46:11 -0700 (Fri, 24 Jul 2009) Log Message: ----------- <rdar://problem/7045141> launchd fails to listen to KeepAlive path alias /var/db Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- 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); } } }
participants (1)
-
source_changes@macosforge.org