Mail Archives: djgpp-workers/1999/06/02/02:59:28
On Tue, 1 Jun 1999, Mark E. wrote:
> > 1. Using the O_NOINHERIT bit only matters for the first 20 handles;
> > handles beyond the first 20 are *never* inherited.
>
> Since the PSP contains a pointer to the parent PSP, couldn't the startup
> code expand the JFT with int 21 ah=67 and then copy over the handles
> > 20. Then go back and put take out the handles with the no-inherit bit
> set?
We could do that in principle, but we would need to make sure the
parent PSP pointer works in all environments. I'm not sure about
emulators like NT, DOSEmu, and OS/2.
There's also a question how badly is this needed. I don't remember
anybody ever complaining about this. I would imagine most people
don't even know that handles beyond 20 aren't inherited.
> More testing shows that the high byte of the device info word can't be
> set with 214401. But when the no-inherit bit is set in the SFT, the child
> does not inherit the handle.
Yes, that's what I saw with the test programs I posted yesterday.
> Also, should _get_dev_info be modified to include the workaround for
> DOS not returning the high byte of the dev info word?
Sorry, I don't follow. What workaround did you have in mind, and
around what problem(s) does it work?
If you mean to use the SFT as the place to get the rest of the info,
then I'm not sure this is worth our while. When `fcntl' supports
F_GETFL, applications would be able to use that instead of the
non-standard `_get_dev_info'.
> And I've noticed that most if not all the files in the src/posix/termios
> directory contain macro defines for the bits in the dev info word.
> Wouldn't it be better to put the macro defines in <io.h> since
> _get_dev_info is prototyped there? Then the many duplicates can be
> removed from the termios directory.
I think that's a good idea.
- Raw text -