diff options
Diffstat (limited to '.local/bin/fetch_mail')
-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; } |