| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Grabbing stderr.... |
Hi Mike, Replying to a message of Mike Bilow to Mike Burgett: MB> Mike Burgett wrote in a message to All: MBu>> (I seem to recall there was a lib function for turning a MBu>> HFILE into a FILE* so the clib functions could use it, but MBu>> after searching the docs this evening, I sure can't find MBu>> it.) MB> I think you are looking for fdopen(), which is POSIX but not ANSI. Noooo... I don't think that's it. I seem to specifically recall that this was for taking an HFILE returned from DosOpen (and presumably DosCreatePipe) and pushing it back into the C-RTL's file descriptors... It even included a warning, as I recall, that after doing this, you shouldn't use any DosXXXX functions to access the handle, and had to use fclose() on the returned FILE * (or presumably close() on the fd) to close it. I'm still struggling with this one, DosCreatePipe seems to work, DosDupHandle seems to work (the output no longer screws up my PDCurses windows) but I seem to be getting garbage when I read the write pipe with DosRead in another thread. Really frustrating, and the nature of the thing I'm working on doesn't lend itself well to trying to catch it in the debugger. :( Thanks, Mike --- FleetStreet 1.18+* Origin: Common Sense BBS - 510.713.7336 Newark, CA (1:215/705) SEEN-BY: 50/99 54/99 270/101 620/243 625/110 160 711/401 413 430 808 934 SEEN-BY: 712/311 407 505 506 517 623 624 704 713/317 800/1 @PATH: 215/705 270/101 712/624 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.