Mail Archives: cygwin-developers/1998/06/28/09:18:10
Christopher Faylor wrote:
pointer on NT? Shouldn't the code be something like:
> >
> > if (!real_path.exec_p)
> > {
> > DWORD done;
> > char magic[2];
> > /* FIXME should we use /etc/magic ? */
> > magic[0] = magic[1] = magic[2] = '\0';
> > ReadFile (get_handle (), magic, 3, &done, 0);
> > if (magic[0] == ':' && magic[1] == '\n')
> > real_path.exec_p = 1;
> >
> > if (magic[0] == '#' && magic[1] == '!')
> > real_path.exec_p = 1;
> > }
> > if (flags & O_APPEND)
> > SetFilePointer (get_handle(), 0, 0, FILE_END);
> > else
> > SetFilePointer (get_handle(), 0, 0, FILE_BEGIN);
>
> Looks like a bug to me. I don't see what NT has to do with anything.
> Wanna submit a patch?
>
Yes, sure.
--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
- Raw text -