On Tue, 18 Mar 2008, Cristian Ionescu-Idbohrn wrote: > Please consider this test script:
I seem to get the behaviour I expect using the attached script, after apllying the attached patch. Cheers, -- Cristian
Index: procps/top.c =================================================================== --- procps/top.c (revision 21370) +++ procps/top.c (working copy) @@ -875,7 +875,12 @@ #if !ENABLE_FEATURE_USE_TERMIOS sleep(interval); #else + bb_error_msg("(K) LINE %d: iterations=%d", __LINE__, iterations); if (safe_poll(pfd, 1, interval * 1000) > 0) { + bb_error_msg("(L) LINE %d: passed safe_poll", __LINE__); + if (OPT_BATCH_MODE) { + sleep(interval); + } else { if (read(0, &c, 1) != 1) /* signal */ break; if (c == initial_settings.c_cc[VINTR]) @@ -921,6 +926,8 @@ #endif #endif } + } else + bb_error_msg("(X) LINE %d: no safe_poll", __LINE__); #endif /* FEATURE_USE_TERMIOS */ } bb_putchar('\n');
bg-top.sh
Description: Bourne shell script
_______________________________________________ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox