/bin/sleep does a lot more work than you'd expect (just ktrace it). this is because it calls setlocale(). apparently so that isdigit() doesn't get confused by wacky foreigners with funny numbers.
there is another solution, given that the problem of identifying digits is not particularly challenging. do it ourselves. cuts an entire banana boat of calls out of ktrace. Index: sleep.c =================================================================== RCS file: /cvs/src/bin/sleep/sleep.c,v retrieving revision 1.20 diff -u -p -r1.20 sleep.c --- sleep.c 21 Nov 2013 15:54:46 -0000 1.20 +++ sleep.c 21 Sep 2015 01:44:40 -0000 @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include <ctype.h> #include <errno.h> #include <locale.h> #include <signal.h> @@ -44,6 +43,12 @@ extern char *__progname; void usage(void); void alarmh(int); +static int +isnumber(int x) +{ + return x >= '0' && x <= '9'; +} + int main(int argc, char *argv[]) { @@ -54,8 +59,6 @@ main(int argc, char *argv[]) struct timespec rqtp; int i; - setlocale(LC_ALL, ""); - signal(SIGALRM, alarmh); while ((ch = getopt(argc, argv, "")) != -1) @@ -71,7 +74,7 @@ main(int argc, char *argv[]) cp = *argv; while ((*cp != '\0') && (*cp != '.')) { - if (!isdigit((unsigned char)*cp)) + if (!isnumber((unsigned char)*cp)) usage(); t = (secs * 10) + (*cp++ - '0'); if (t / 10 != secs) /* oflow */ @@ -85,7 +88,7 @@ main(int argc, char *argv[]) for (i = 100000000; i > 0; i /= 10) { if (*cp == '\0') break; - if (!isdigit((unsigned char)*cp)) + if (!isnumber((unsigned char)*cp)) usage(); nsecs += (*cp++ - '0') * i; } @@ -96,7 +99,7 @@ main(int argc, char *argv[]) * checking the rest of the argument. */ while (*cp != '\0') { - if (!isdigit((unsigned char)*cp++)) + if (!isnumber((unsigned char)*cp++)) usage(); } }