At 06:10 PM 10/23/99 +0200, Adrian Aichner wrote:
>>>>> "Craig" == Craig Lanning
<CraigL(a)DyCon.com> writes:
>> Craig,
>>
>> I'm confident I found the problem. If so, then it's not
>> related to 95/98 vs. NT.
Craig> I'm afraid not :-(
Hi Craig,
I'm so far past my wit's end, that I'm getting serious again!
I have revisited my options and settled for minimal change. This is
the realistic route to get this into 21.1.8 (no, I havn't given up
just yet, I hope you haven't either).
Simple is usually best.
This patch is against 21.2-b19 again, but it's smaller. I have
reverted all my indentation changes (which make the functions I
touched comply with GNU formatting standards).
Reviewing each patch hunk I have re-implemented the whole thing.
I invert 95/98 PIDs in create_child and keep them that way when
converting to Lisp_Int. Everywhere Lisp_Int PIDs are converted back
to int, I invert them (when on OS_WIN95) before use. Wherever I call
OpenProcess I invert the PID for OS_WIN95.
I have proven my patch to be correct by inverting all tests from
if (os_subtype == OS_WIN95)
to
if (os_subtype != OS_WIN95)
Now I get these warnings on NT:
Fcall_process_internal.child_setup returns PID -306, using PID 306
create_child.CreateProcess abs(PID) -343 > EMACS_INT_MAX (2147483647)
Fcall_process_internal.child_setup returns PID -343, using PID 343
create_child.CreateProcess abs(PID) -282 > EMACS_INT_MAX (2147483647)
Fcall_process_internal.child_setup returns PID -282, using PID 282
create_child.CreateProcess abs(PID) -280 > EMACS_INT_MAX (2147483647)
Fcall_process_internal.child_setup returns PID -280, using PID 280
create_child.CreateProcess abs(PID) -146 > EMACS_INT_MAX (2147483647)
Fcall_process_internal.child_setup returns PID -146, using PID 146
create_child.CreateProcess abs(PID) -298 > EMACS_INT_MAX (2147483647)
Fcall_process_internal.child_setup returns PID -298, using PID 298
BUT, call-process still works, returning correct exit status and never
obtaining invalid process handles. This proves that negative PIDs can
be passed to Lisp and back. On Windows 95/98 we will need the
opposite, but that requires one bit less.
I had to disable a meaningless fork test in src/callproc.c for
WINDOWSNT, which I intend to leave in:
#ifndef WINDOWSNT
if (pid < 0)
{
if (fd[0] >= 0)
close (fd[0]);
report_file_error ("Doing fork", Qnil);
}
#endif
Please try this patch and, by all means, report success!
It seems to work. (See response to your other message for exception.)
Are there any more testers on 95/98 out there? Testing with and
without USE_UNION_TYPE is desirable.
These results are with USE_UNION_TYPE.
Please refer to earlier test-cases in this thread and send me their
output, as well as any STDERR of XEmacs itself.
Thanks in advance!
Adrian
>> Let me guess that you are NOT building with USE_UNION_TYPE.
>> Well, I am.
Craig> That is correct.
[Patch deleted]