Kaffe+MC+HP-UX
kaffe@rufus.w3.org
kaffe@rufus.w3.org
Wed, 26 Aug 1998 18:57:21 +0100
--0__=gUuVZ0bc9qzX8hLNyt5wuzsMusucBiE5Z3Q3F8Oz4o3ghX2Zpf1ztBtI
Content-type: text/plain; charset=US-ASCII
Hello!
This patch makes Kaffe work from Midnight Commander with subshell support
on HP-UX 10.20. In this situation Kaffe uses /dev/pts/N as stdout (where N
is some number). On this system both FIOSSAIOSTAT and FIOASYNC are defined,
but if Kaffe uses FIOSSAIOSTAT (in
kaffe/kaffe/kaffevm/systems/unix-jthreads/jthread.c) it fails on pty
devices. Errno is EINVAL. Kaffe terminates shortly with "assertion failed".
FIOASYNC seems to work on all devices (I tested plain file, /dev/null, tty
and pty) but I have no idea how to check if this call actually does what it
should do. I have changed jthread.c so that Kaffe uses FIOASYNC (if
available) rather than FIOSSAIOSTAT.
The same problem appears in the same file when FIOSSAIOOWN is used. The
only difference is that nothing bad happens, just some warnings are
printed. The fix is the same: only on hpux and only if the alternative is
available.
After this fix Kaffe runs from Midnight Commander and passes most
regression tests. Only ProcessTest, UDPTest and KaffeVerifyBug fail, but
they failed before this fix too. All tests for threads seem to work.
Comments /* on hpux */ are removed because they become incorrect. By the
way, if it actually was for HP-UX only, the best solution would be to try
the second (non-HP-UX specific) method before the first (fallback for
HP-UX) on all machines.
Pavel Roskin <pavel.roskin@ecsoft.co.uk>
(See attached file: kaffe-mc.diff)
--0__=gUuVZ0bc9qzX8hLNyt5wuzsMusucBiE5Z3Q3F8Oz4o3ghX2Zpf1ztBtI
Content-type: application/octet-stream;
name="kaffe-mc.diff"
Content-transfer-encoding: base64
LS0tIGthZmZlL2thZmZlL2thZmZldm0vc3lzdGVtcy91bml4LWp0aHJlYWRzL2p0aHJlYWQuYy5v
cmlnCVdlZCBBdWcgMjYgMDg6Mzg6NDcgMTk5OA0KKysrIGthZmZlL2thZmZlL2thZmZldm0vc3lz
dGVtcy91bml4LWp0aHJlYWRzL2p0aHJlYWQuYw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