summaryrefslogtreecommitdiffstats
path: root/.local
diff options
context:
space:
mode:
authorjoe <rbo@gmx.us>2025-10-02 12:27:04 +0200
committerjoe <rbo@gmx.us>2025-10-02 12:27:04 +0200
commitb08e3642002e318a114b7db52b8c6561383ff93d (patch)
treec560eefa549d19268141b32967a81a795d9b1cc5 /.local
parentup (diff)
downloaddotfiles-bsd-b08e3642002e318a114b7db52b8c6561383ff93d.tar.gz
dotfiles-bsd-b08e3642002e318a114b7db52b8c6561383ff93d.tar.bz2
dotfiles-bsd-b08e3642002e318a114b7db52b8c6561383ff93d.tar.xz
dotfiles-bsd-b08e3642002e318a114b7db52b8c6561383ff93d.tar.zst
dotfiles-bsd-b08e3642002e318a114b7db52b8c6561383ff93d.zip
up
Diffstat (limited to '')
-rwxr-xr-x.local/bin/fetch_mail8
1 files changed, 7 insertions, 1 deletions
diff --git a/.local/bin/fetch_mail b/.local/bin/fetch_mail
index 53967ab..9f1ca5b 100755
--- a/.local/bin/fetch_mail
+++ b/.local/bin/fetch_mail
@@ -11,11 +11,17 @@ sub get_new_mail
my $pid;
$pid = fork();
- exec('herbe', ' failed to fork') if ($pid < 0);
+ exec('herbe', ' failed to fork for killall') if ($pid < 0);
if (not $pid) {
exec('killall', 'mbsync');
}
while (wait() != -1) {}
+ $pid = fork();
+ exec('herbe', ' failed to fork for mbsync') if ($pid < 0);
+ if (not $pid) {
+ exec('mbsync', '-a');
+ }
+ while (wait() != -1) {}
return;
}