delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/13/12:28:14

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <corinna-cygwin AT cygwin DOT com>
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: <Sea2-F40WgP1A83xiDd00066c52 AT hotmail DOT com>
Mime-Version: 1.0
In-Reply-To: <Sea2-F40WgP1A83xiDd00066c52@hotmail.com>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019