Re: lseek problem

2004-06-06 Thread Dan Nelson
In the last episode (Jun 06), Tim Pushor said:
> I am working on porting an old system over to FreeBSD, and am having
> a weird (to me) problem. This system uses various data file types,
> and unfortunately it uses the group_id execution bit (but no execute)
> on a data file to signify a sequential type file (mode 2440). I have
> stepped through the code, and it is failing on an lseek
> (fd,0,SEEK_SET) where fd is the properly opened file descriptor for
> one of these files. This file is readable by the user and is about 2K
> in size. this lseek should work shoudn't it? Its returning -1 and
> sets errno to 22 (EINVAL). Could this be because of the weird mode?
> man chmod doesn't say anything about what the set-group-id bit does
> to non-executable files. Could this be the problem?

The only obvious cause of EINVAL from lseek would be an invalid third
argument.  The program doesn't try and define SEEK_SET itself, does it?

-- 
Dan Nelson
[EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


lseek problem

2004-06-05 Thread Tim Pushor
Hi all,
I am working on porting an old system over to FreeBSD, and am having a 
weird (to me) problem. This system uses various data file types, and 
unfortunately it uses the group_id execution bit (but no execute) on a 
data file to signify a sequential type file (mode 2440). I have stepped 
through the code, and it is failing on an lseek (fd,0,SEEK_SET) where fd 
is the properly opened file descriptor for one of these files. This file 
is readable by the user and is about 2K in size. this lseek should work 
shoudn't it? Its returning -1 and sets errno to 22 (EINVAL). Could this 
be because of the weird mode? man chmod doesn't say anything about what 
the set-group-id bit does to non-executable files. Could this be the 
problem?

Please reply to me as I don't subscribe to this list.
Thank you in advance,
Tim
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"