Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site Gregorio.ARPA
Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!hplabs!intelca!qantel!dual!amd!decwrl!CSL-Vax!Gregorio!mogul
From: mogul@Gregorio.ARPA
Newsgroups: net.bugs.4bsd
Subject: tftp dies when interrupted during a transfer
Message-ID: <155@Gregorio.ARPA>
Date: Thu, 18-Oct-84 16:42:57 EDT
Article-I.D.: Gregorio.155
Posted: Thu Oct 18 16:42:57 1984
Date-Received: Mon, 22-Oct-84 07:08:25 EDT
Distribution: net
Organization: Stanford University
Lines: 36

Index:	ucb/tftp/main.c 4.2BSD Fix

Description:
	When using tftp to send/receive a file, if you type ^C during
	a transfer, you get back to the command level but shortly
	thereafter the timeout alarm goes off and the program dies
	with a "longjmp botch"
Repeat-By:
	% tftp ucbarpa
	tftp> timeout 10
	tftp> get /etc/passwd /dev/null
	^C
	tftp> 
		longjmp botch
		Illegal instruction (core dumped)
Fix:
	Turn off the alarm when servicing a SIGINT:
*** main.c.old	Mon Jan 23 12:17:04 1984
--- main.c	Thu Oct 18 12:58:29 1984
***************
*** 426,432
  
  intr()
  {
! 
  	longjmp(toplevel, -1);
  }
  

--- 431,437 -----
  
  intr()
  {
! 	alarm(0);	/* prevent timer() in tftp.c from going off */
  	longjmp(toplevel, -1);
  }