diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2011-01-04 19:56:15 +0700 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2011-01-04 19:56:15 +0700 |
commit | 5f6f2162512106adf120d4b528bb125e93e34429 (patch) | |
tree | 7d7449f755633c263be7125ad58d21cc3ca5b8a7 /runit | |
parent | 9db69882bee2d528d706d61d34ef7741122330be (diff) | |
parent | a116552869db5e7793ae10968eb3c962c69b3d8c (diff) | |
download | busybox-w32-5f6f2162512106adf120d4b528bb125e93e34429.tar.gz busybox-w32-5f6f2162512106adf120d4b528bb125e93e34429.tar.bz2 busybox-w32-5f6f2162512106adf120d4b528bb125e93e34429.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runsvdir.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runit/runsvdir.c b/runit/runsvdir.c index e77eeff04..166664237 100644 --- a/runit/runsvdir.c +++ b/runit/runsvdir.c | |||
@@ -312,8 +312,11 @@ int runsvdir_main(int argc UNUSED_PARAM, char **argv) | |||
312 | last_mtime = s.st_mtime; | 312 | last_mtime = s.st_mtime; |
313 | last_dev = s.st_dev; | 313 | last_dev = s.st_dev; |
314 | last_ino = s.st_ino; | 314 | last_ino = s.st_ino; |
315 | //if (now <= mtime) | 315 | /* if the svdir changed this very second, wait until the |
316 | // sleep(1); | 316 | * next second, because we won't be able to detect more |
317 | * changes within this second */ | ||
318 | while (time(NULL) == last_mtime) | ||
319 | usleep(100000); | ||
317 | need_rescan = do_rescan(); | 320 | need_rescan = do_rescan(); |
318 | while (fchdir(curdir) == -1) { | 321 | while (fchdir(curdir) == -1) { |
319 | warn2_cannot("change directory, pausing", ""); | 322 | warn2_cannot("change directory, pausing", ""); |