Subject: Re: NetBSD/systrace error: EINVAL
To: Kristaps Johnson <kristaps@gradient-enterprises.com>
From: Seth Kurtzberg <seth@cql.com>
List: tech-misc
Date: 07/04/2006 16:50:33
On Tue, 4 Jul 2006 16:47:24 -0400 (EDT)
Kristaps Johnson <kristaps@gradient-enterprises.com> wrote:

> 
> >> No, it returns with success.  I just re-ran with:
> >
> > In your code, it is not checked, so you can't know that it returned with 
> > success.  If the code you are actually running is different, please post 
> > that code.  Otherwise, you must check the return value of open, you 
> > can't just assume it is correct.
> 
> Seth, the sample code is a mock-up of what was causing me problems from my 
> original codebase - namely, EINVAL at read.  I duplicated only the 
> problem-causing code and the steps required to get there (originally in 
> effort to clarify the problem), then removed all ancillary error-checking 
> for newspost-ready brevity.
> 
> I can re-post the sample code with full error-checking but it does not 
> change the results (Invalid argument, meh).

It's better to post the real code.  There could be something significant there that you have missed.  It's unlikely, but it isn't impossible, so I would post the actual code.

> 
> Thanks,
>    Kristaps
>