Date: Wed, 2 Jun 1999 09:57:07 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Mark E." cc: djgpp-workers AT delorie DOT com Subject: Re: enhancements to fcntl.c In-Reply-To: <199906020133.BAA158200@out4.ibm.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 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.