]> git.pld-linux.org Git - packages/busybox.git/blob - busybox-1.18.0-runsvdir.patch
- up to 1.18.0
[packages/busybox.git] / busybox-1.18.0-runsvdir.patch
1 diff -urpN busybox-1.18.0/runit/runsvdir.c busybox-1.18.0-runsvdir/runit/runsvdir.c
2 --- busybox-1.18.0/runit/runsvdir.c     2010-11-22 21:43:22.000000000 +0100
3 +++ busybox-1.18.0-runsvdir/runit/runsvdir.c    2010-12-06 01:27:56.926036992 +0100
4 @@ -312,8 +312,11 @@ int runsvdir_main(int argc UNUSED_PARAM,
5                                                 last_mtime = s.st_mtime;
6                                                 last_dev = s.st_dev;
7                                                 last_ino = s.st_ino;
8 -                                               //if (now <= mtime)
9 -                                               //      sleep(1);
10 +                                               /* if the svdir changed this very second, wait until the
11 +                                                * next second, because we won't be able to detect more
12 +                                                * changes within this second */
13 +                                               while (time(NULL) == last_mtime)
14 +                                                       usleep(100000);
15                                                 need_rescan = do_rescan();
16                                                 while (fchdir(curdir) == -1) {
17                                                         warn2_cannot("change directory, pausing", "");
This page took 0.045031 seconds and 3 git commands to generate.