Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/duration.c')
-rw-r--r--libbb/duration.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbb/duration.c b/libbb/duration.c
index a6a29ddae..793d02f42 100644
--- a/libbb/duration.c
+++ b/libbb/duration.c
@@ -76,6 +76,12 @@ void FAST_FUNC sleep_for_duration(duration_t duration)
ts.tv_sec = duration;
ts.tv_nsec = (duration - ts.tv_sec) * 1000000000;
}
+ /* NB: if ENABLE_ASH_SLEEP, we end up here if "sleep N"
+ * is run in ash. ^C will still work, because ash's signal handler
+ * does not return (it longjumps), the below loop
+ * will not continue looping.
+ * (This wouldn't work in hush)
+ */
do {
errno = 0;
nanosleep(&ts, &ts);