summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-11-27 09:58:03 +0100
committerRemi Collet <remi@remirepo.net>2019-11-27 09:58:03 +0100
commit523847c25741838a7c0f6c1fedd6a29a9ecd6936 (patch)
tree59afd99532cc594818483fea505073e12afd6c2e
parent47c16563b9c94991e3a1e75391469782e5d8835e (diff)
avoid flood in cron
-rwxr-xr-xcheck.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/check.php b/check.php
index 5f52566..2a8a7cc 100755
--- a/check.php
+++ b/check.php
@@ -217,7 +217,9 @@ if ($ref) {
if ($cli) {
$nb=count($pids);
while (count($pids)) {
- printf("Wait %d\r", count($pids));
+ if (posix_isatty(STDOUT)) {
+ printf("Wait %d\r", count($pids));
+ }
$pid = pcntl_wait($status);
if ($pid<0) {
die("Cound not wait\n");