From owner-freebsd-questions@FreeBSD.ORG Sat Jun 5 23:05:09 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EE3716A4CE for ; Sat, 5 Jun 2004 23:05:09 -0700 (PDT) Received: from hercules.crossthread.com (hercules.crossthread.com [64.56.149.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15D7543D39 for ; Sat, 5 Jun 2004 23:05:09 -0700 (PDT) (envelope-from timp@crossthread.com) Received: from [192.168.1.2] (dedalus.crossthread.com [192.168.1.2]) (authenticated) by hercules.crossthread.com (8.11.3/8.11.3) with ESMTP id i5667iU21508 for ; Sun, 6 Jun 2004 00:07:44 -0600 (MDT) Message-ID: <40C2B409.6070705@crossthread.com> Date: Sun, 06 Jun 2004 00:04:57 -0600 From: Tim Pushor User-Agent: Mozilla Thunderbird 0.6 (Windows/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: lseek problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 06:05:09 -0000 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