* spawn.cc (av::fixup): Avoid breaking out of the wrong "loop".
This commit is contained in:
parent
59960f651d
commit
fef80fce55
@ -1,3 +1,7 @@
|
|||||||
|
2005-09-14 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* spawn.cc (av::fixup): Avoid breaking out of the wrong "loop".
|
||||||
|
|
||||||
2005-09-14 Christopher Faylor <cgf@timesys.com>
|
2005-09-14 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* hookapi.cc (hook_or_detect_cygwin): Simplify very slightly.
|
* hookapi.cc (hook_or_detect_cygwin): Simplify very slightly.
|
||||||
|
@ -1047,25 +1047,24 @@ av::fixup (child_info_types chtype, const char *prog_arg, path_conv& real_path,
|
|||||||
if (!buf)
|
if (!buf)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
do
|
{
|
||||||
{
|
myfault efault;
|
||||||
myfault efault;
|
if (efault.faulted ())
|
||||||
if (efault.faulted ())
|
{
|
||||||
{
|
UnmapViewOfFile (buf);
|
||||||
UnmapViewOfFile (buf);
|
real_path.set_cygexec (false);
|
||||||
real_path.set_cygexec (false);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
if (buf[0] == 'M' && buf[1] == 'Z')
|
||||||
if (buf[0] == 'M' && buf[1] == 'Z')
|
{
|
||||||
{
|
unsigned off = (unsigned char) buf[0x18] | (((unsigned char) buf[0x19]) << 8);
|
||||||
unsigned off = (unsigned char) buf[0x18] | (((unsigned char) buf[0x19]) << 8);
|
win16_exe = off < sizeof (IMAGE_DOS_HEADER);
|
||||||
win16_exe = off < sizeof (IMAGE_DOS_HEADER);
|
if (!win16_exe)
|
||||||
if (!win16_exe)
|
real_path.set_cygexec (!!hook_or_detect_cygwin (buf, NULL));
|
||||||
real_path.set_cygexec (!!hook_or_detect_cygwin (buf, NULL));
|
UnmapViewOfFile (buf);
|
||||||
UnmapViewOfFile (buf);
|
break;
|
||||||
break;
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
|
||||||
|
|
||||||
debug_printf ("%s is possibly a script", (char *) real_path);
|
debug_printf ("%s is possibly a script", (char *) real_path);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user