Mail Archives: djgpp-workers/1999/04/25/15:36:10
> 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/
- Raw text -