I switched to zsh for my daily usage recently. One problem that I come across is that how I can autostart some background command line executable(for example, fetchmail -d 1800). When I add the line into ~/.zprofile or ~/.zshrc, everything goes fine until I open another zsh process instance(in fact, I am using tmux so it happens frequently), fetchmail complains that
fetchmail: can't accept options while a background fetchmail is running.
I thought that ~/.zprofile might only be executed once, but It seems that I was wrong. So how can I handle it properly?
Thanks.