diff options
Diffstat (limited to 'contrib/lukemftp/src/ftp.c')
-rw-r--r-- | contrib/lukemftp/src/ftp.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/lukemftp/src/ftp.c b/contrib/lukemftp/src/ftp.c index 0c3b3d4..72a4262 100644 --- a/contrib/lukemftp/src/ftp.c +++ b/contrib/lukemftp/src/ftp.c @@ -1,7 +1,7 @@ -/* $NetBSD: ftp.c,v 1.125 2004/04/10 12:21:39 lukem Exp $ */ +/* $NetBSD: ftp.c,v 1.126 2004/07/20 10:40:22 lukem Exp $ */ /*- - * Copyright (c) 1996-2002 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2004 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -99,7 +99,7 @@ #if 0 static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94"; #else -__RCSID("$NetBSD: ftp.c,v 1.125 2004/04/10 12:21:39 lukem Exp $"); +__RCSID("$NetBSD: ftp.c,v 1.126 2004/07/20 10:40:22 lukem Exp $"); #endif #endif /* not lint */ @@ -131,8 +131,9 @@ __RCSID("$NetBSD: ftp.c,v 1.125 2004/04/10 12:21:39 lukem Exp $"); #include "ftp_var.h" -volatile int abrtflag = 0; -volatile int timeoutflag = 0; +volatile sig_atomic_t abrtflag; +volatile sig_atomic_t timeoutflag; + sigjmp_buf ptabort; int ptabflg; int ptflag = 0; @@ -318,6 +319,7 @@ cmdabort(int notused) { int oerrno = errno; + sigint_raised = 1; alarmtimer(0); if (fromatty) write(fileno(ttyout), "\n", 1); @@ -601,6 +603,7 @@ abortxfer(int notused) char msgbuf[100]; int len; + sigint_raised = 1; alarmtimer(0); mflag = 0; abrtflag = 0; @@ -1742,6 +1745,7 @@ psabort(int notused) { int oerrno = errno; + sigint_raised = 1; alarmtimer(0); abrtflag++; errno = oerrno; @@ -1838,6 +1842,7 @@ void abortpt(int notused) { + sigint_raised = 1; alarmtimer(0); if (fromatty) write(fileno(ttyout), "\n", 1); @@ -2056,6 +2061,7 @@ abort_squared(int dummy) char msgbuf[100]; int len; + sigint_raised = 1; alarmtimer(0); len = strlcpy(msgbuf, "\nremote abort aborted; closing connection.\n", sizeof(msgbuf)); |