diff options
author | joe <rbo@gmx.us> | 2025-10-02 12:27:04 +0200 |
---|---|---|
committer | joe <rbo@gmx.us> | 2025-10-02 12:27:04 +0200 |
commit | b08e3642002e318a114b7db52b8c6561383ff93d (patch) | |
tree | c560eefa549d19268141b32967a81a795d9b1cc5 /.local/bin/fetch_mail | |
parent | up (diff) | |
download | dotfiles-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_mail | 8 |
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; } |