diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2015-03-06 15:41:09 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2015-03-06 15:41:45 -0800 |
commit | e1acc3c7efb805d659f9edf345fc18a4647df538 (patch) | |
tree | 2127bc1ad49856a87a39c7af2b31e33dd605b6b3 /etc/images | |
parent | 20c6b227ea69b9cd47f92d1a7e0935312e8ce83c (diff) | |
download | emacs-e1acc3c7efb805d659f9edf345fc18a4647df538.tar.gz |
Random minor fixes for movemail
* movemail.c: Include <stdbool.h> and <signal.h>.
(waitpid) [WINDOWSNT]: New macro.
(wait) [WINDOWSNT]: Remove.
(main, popmail, pop_retr, mbx_write, mbx_delimit_begin)
(mbx_delimit_end): Use bool for boolean.
(main): Simplify #if usage a bit.
(main): Don't assume EOF == -1. Prefer 'return' to 'exit'. Don't
possibly unlink lockname twice, as that's a race condition. Set
SIGCHLD to SIG_DFL to work around SysV misfeature. Check for fork
failure. Use waitpid, not wait, to avoid a race condition in the
unlikely case where we start up with a child.
(NOTOK, OK): Remove, in favor of plain boolean.
(popmail, pop_retr): Don't get confused about errno, e.g., ferror
need not set errno.
(popmail): Use fclose (mbf), not close (fileno (mbf)), to also
detect any stream-related errors (e.g., memory exhaustion).
(pop_retr): Report pop errors separately, since caller now does
errno reporting.
(mbx_write, mbx_delimit_begin, mbx_delimit_end): Check < 0, not ==
EOF, as it's a bit faster and (in theory) pickier.
Diffstat (limited to 'etc/images')
0 files changed, 0 insertions, 0 deletions