diff options
author | Eric Wong <e@80x24.org> | 2021-02-07 23:05:11 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-08 22:07:42 +0000 |
commit | 80ba871c557eb5ba79c73150519ce9ea5225d695 (patch) | |
tree | 891a8b05bb0338d0afdb07b5eae72bb2d6285b6e /script | |
parent | c642cbd0b4e490d5c0922f0659129c936e5349c8 (diff) | |
download | public-inbox-80ba871c557eb5ba79c73150519ce9ea5225d695.tar.gz |
While using utime on the destination Maildir is enough for mutt to eventually notice new mail, "eventually" isn't good enough. Send a SIGWINCH to wake mutt (and likely other MUAs) immediately. This is more portable than relying on MUAs to support inotify or EVFILT_VNODE.
Diffstat (limited to 'script')
-rwxr-xr-x | script/lei | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -105,13 +105,15 @@ Falling back to (slow) one-shot mode die "recvmsg: $!"; } last if $buf eq ''; - if ($buf =~ /\Ax_it ([0-9]+)\z/) { + if ($buf =~ /\Aexec (.+)\z/) { + $exec_cmd->(\@fds, split(/\0/, $1)); + } elsif ($buf eq '-WINCH') { + kill($buf, $$); # for MUA + } elsif ($buf =~ /\Ax_it ([0-9]+)\z/) { $x_it_code = $1 + 0; last; } elsif ($buf =~ /\Achild_error ([0-9]+)\z/) { $x_it_code = $1 + 0; - } elsif ($buf =~ /\Aexec (.+)\z/) { - $exec_cmd->(\@fds, split(/\0/, $1)); } else { $sigchld->(); die $buf; |