aboutsummaryrefslogtreecommitdiffstats
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
commit5a24fdc29c35cb5f00d97c9ac86e3588ece5c095 (patch)
treec70394454b1f2ddb108160e6135427e37d090e1f
parente0223d8b5031e179462b250a8ab04315057e740a (diff)
downloadmbsyncloop-5a24fdc29c35cb5f00d97c9ac86e3588ece5c095.tar.gz
mbsyncloop-5a24fdc29c35cb5f00d97c9ac86e3588ece5c095.zip
fix busy loop
not sure why, but
-rwxr-xr-xmbsyncloop4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbsyncloop b/mbsyncloop
index 8399d36..fba66fd 100755
--- a/mbsyncloop
+++ b/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;
}
}