Subject: Re: process hangs in short wait
To: None <andreas@planix.com>
From: Ronald Khoo <ronald@demon.net>
List: port-i386
Date: 02/06/1998 00:47:30
>    370 brw1     CALL  open(0x1881bf8,0,0xffffffff)
>    370 brw1     NAMI  "/emul/ibcs2/dev/"
>    370 brw1     NAMI  "/dev/"
>    370 brw1     RET   open 5
>    370 brw1     CALL  read(0x5,0xefbfda00,0x10)

Argh -- this won't work.  This app was compiled on an older xenix
box that didn't use the getdents() system call to read directories
(or perhaps the developer accidentally said -lndir to deliberately
load the old opendir/readdir calls in order to be compatible
with pre-2.3 xenix kernels which did not support getdents -- something
which I used to do too)

the code is depending upon the old 14 character limited 64k inode
limited v7 directory format where you can read a directory 16 bytes
at a time and get a single directory entry each time.
Or do "ls" with "od -c ." :-)

You may have to get your app vendor to recompile his code to use
getdents (involves changing the source code though -- you need 
to use different headers to align with the different libc calls :-(),
or you might get away with making a plain regular empty file
of the name /emul/ibcs2/dev.  Worst come to the worst, you might
have to craft a xenix format /dev and mess about to get the data
into the directory blocks, then never run fsck on the disc again
(No, I'm not really suggesting this one :-)

Perhaps the "right" thing to do would be for the emulation code
to trap open/read access to directories and DTRT with them?


--