Re: execl bug?
From: Christopher Weimann (csw_at_k12hq.com)
Date: 12/30/04
- Previous message: Dan Nelson: "Re: execl bug?"
- In reply to: Dan Nelson: "Re: execl bug?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Dec 2004 20:10:54 -0500 To: Dan Nelson <dnelson@allantgroup.com>
On 12/29/2004-06:10PM, Dan Nelson wrote:
>
> I think your problem here is with rewind(). There's nothing that says
> it has to change the underlying filedescriptor; FreeBSD's fseek code
> knows that the beginning of the file is still within its stdio buffer,
> so it simply resets the seek offset in the FILE* back to zero. See the
> code in /usr/src/lib/libc/stdio/fseek.c . Replacing your rewind() with
> an lseek(0,0,SEEK_SET) makes the program work.
>
> --
> Dan Nelson
> dnelson@allantgroup.com
>
Perfect! It works, and it even makes sense to me :)
Thank you!
-- _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- Previous message: Dan Nelson: "Re: execl bug?"
- In reply to: Dan Nelson: "Re: execl bug?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]