Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Sat, 13 Mar 2004 18:27:55 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: read(): varblk tape records...(& Fix for : read()) Message-ID: <20040313172755.GI25204@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2i On Mar 6 08:20, Jason Winter wrote: > Hi Corinna, > > When you do get a working tape drive, here is an example of read making the > next write 'go bad'... > > Fixed Blocks... which I don't use... (Use a parameter on testtape.exe to > test both cases.) > Jason. > ps. Why did it get a protection-fault? maybe it's the cygwin1.dll snapshot, > but I only get it with *that* example where the API is failing. It's a bug in your my_read1 code. > void my_read1 (int fh) { > int rc; > int en; > char buf2 [1]; > > printf ("read1..."); > fflush (stdout); > memset (buf2, ' ', 10); > > errno = 0; > rc = read (fh, buf2, 1); > en = errno; > > printf (" rc=%d, errno=%d\n", rc, en); > buf2 [1] = 0; ============= > printf ("%s\n", buf2); > disp_stat (); > common (); > }; Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/