Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!mit-eddie!Think!ames!cit-vax!tybalt.caltech.edu!walton From: walton@tybalt.caltech.edu.UUCP Newsgroups: comp.sys.amiga Subject: Re: Shellv2.05 trashing disk? Message-ID: <1640@cit-vax.Caltech.Edu> Date: Thu, 29-Jan-87 13:59:39 EST Article-I.D.: cit-vax.1640 Posted: Thu Jan 29 13:59:39 1987 Date-Received: Sat, 31-Jan-87 03:39:23 EST References: <595@rayssd.RAY.COM> Sender: news@cit-vax.Caltech.Edu Reply-To: walton@tybalt.caltech.edu.UUCP (Steve Walton) Distribution: na Organization: Calfornia Institute of Technology Lines: 19 Keywords: Shellv2.05 Summary: timeout value bug in WaitForInput() In article <595@rayssd.RAY.COM> reh@rayssd.RAY.COM (Robert E. Hathaway) writes: > > I recently installed Steve Drew's ShellV2.05 on my system. >After using it for most of the night I rebooted my system one last time >and got a "not a DOS disk message". This was like deja vu having had a >disk trashed with the shell V2.03. After running diskdoctor I was told >that track 40, sector 0 was bad. This software is great but what a price. >I am backing out to V2.04 and hoping the problem doesn't exist there and >just hasn't manifested itself yet. Sounds like an old bug got mistakenly re-introduced. To do the command line editing, Drew's shell sets the console to RAW mode when taking input, then back to CON mode while a command is running so as to get typeahead capability. But when he used WaitForInput(file-handle, 1L) to get the typeahead after completion of the command, he got disk trashing. Setting the timeout on WaitForInput to any value other than 1L (2L or more) fixed the problem. A quick look at the source for Shell 2.05 shows at least one WaitForInput() call with 1L as the timeout, in main(). Change it to 2L and see if it fixes the problem.