forked from mirrors/tftp-hpa-google
signals: require and always use sigaction()
tftpd already requires sigaction() to compile, so there is no reason to use anything else. It also allows for nicer combination of flags. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
e52af4207a
commit
33051a296c
6 changed files with 22 additions and 55 deletions
|
@ -84,7 +84,7 @@ void tftp_sendfile(int fd, const char *name, const char *mode)
|
|||
is_request = 1; /* First packet is the actual WRQ */
|
||||
amount = 0;
|
||||
|
||||
tftp_signal(SIGALRM, timer);
|
||||
tftp_signal(SIGALRM, timer, 0);
|
||||
do {
|
||||
if (is_request) {
|
||||
size = makerequest(WRQ, name, dp, mode) - 4;
|
||||
|
@ -190,7 +190,7 @@ void tftp_recvfile(int fd, const char *name, const char *mode)
|
|||
firsttrip = 1;
|
||||
amount = 0;
|
||||
|
||||
tftp_signal(SIGALRM, timer);
|
||||
tftp_signal(SIGALRM, timer, 0);
|
||||
do {
|
||||
if (firsttrip) {
|
||||
size = makerequest(RRQ, name, ap, mode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue