Correct the usleep calculation in fish_test_helper

'fish_test_helper print_pid_then_sleep' tried to sleep for .5 seconds,
but instead it divided by .5 so it actually slept for 2 seconds.

This exceeds the maximum value on NetBSD so it wasn't sleeping at all
there.

Fixes #6476
This commit is contained in:
ridiculousfish 2020-01-07 17:02:04 -08:00
parent cc7618985a
commit e0cdea9bb6

View File

@ -50,7 +50,7 @@ static void print_stdout_stderr() {
static void print_pid_then_sleep() {
fprintf(stdout, "%d\n", getpid());
fflush(nullptr);
usleep(1000000 / .5); //.5 secs
usleep(1000000 / 2); //.5 secs
}
static void print_pgrp() { fprintf(stdout, "%d\n", getpgrp()); }