| www.delorie.com/djgpp/mail-archives/browse.cgi | search |
| Message-Id: | <199904251935.TAA109626@out1.ibm.net> |
| From: | "Mark E." <snowball3 AT usa DOT net> |
| To: | djgpp-workers AT delorie DOT com |
| Date: | Sun, 25 Apr 1999 15:36:28 -0400 |
| MIME-Version: | 1.0 |
| Subject: | Re: fsext patches for dup and dup2 |
| In-reply-to: | <199904251638.MAA09874@envy.delorie.com> |
| References: | <Pine DOT SUN DOT 3 DOT 91 DOT 990425190529 DOT 7199G-100000 AT is> (message from Eli Zaretskii on Sun, 25 Apr 1999 19:09:59 +0300 (IDT)) |
| X-mailer: | Pegasus Mail for Win32 (v3.01d) |
| 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 |
> The only problem I can think of off-hand is that dup/dup2 are usually used > just before running a child program, to set up stdin/stdout, and that just > won't work for fsext handles. > True, it won't work for fsext allocated handles. But when fsext is used to keep state information about a actual handle (e.g. for emulating the pipes), then adding fsext code to dup & dup2 is essential for the emulation to work properly (e.g. to know when the file being used to emulate the pipe can be safely deleted). For cases where a fsext allocated handle is being used (for Unix style access to serial ports, memory mapping as the fsext docs mention), you wouldn't want to dup2 it to stdin/stdout anyway. Perhaps I should write up for the docs the above uses and nonuses of fsexts for dup and dup2 if the patch is eventually accepted? Mark --- Mark Elbrecht, snowball3 AT usa DOT net http://snowball.frogspace.net/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |