summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2022-02-08 02:04:28 -0500
committerJesse Luehrs <doy@tozt.net>2022-02-08 02:04:28 -0500
commitf06189cd4bdeddf10a0687577505c5bf219c200e (patch)
tree9266436ca965c92cfc33edfc9911eb46728c3c44
parentb60155ba6b7f09d88a3926c3b22c53c4c5e01094 (diff)
downloadconf-f06189cd4bdeddf10a0687577505c5bf219c200e.tar.gz
conf-f06189cd4bdeddf10a0687577505c5bf219c200e.zip
fix busy loop
not sure why, but
-rwxr-xr-xbin/mbsyncloop4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/mbsyncloop b/bin/mbsyncloop
index 8399d36..fba66fd 100755
--- a/bin/mbsyncloop
+++ b/bin/mbsyncloop
@@ -48,10 +48,10 @@ die "fork failed: $!" unless defined $pw_pid;
if (!$pw_pid) {
$SIG{PIPE} = 'IGNORE';
setpgrp(0, 0);
- open my $fh, '>', $pw_pipe or die "couldn't open $pw_pipe";
while (1) {
+ open my $fh, '>', $pw_pipe or die "couldn't open $pw_pipe";
$fh->print("$pw\n");
- $fh->flush;
+ close $fh;
}
}