[Coco] OS-9 "C" question
Willard Goosey
goosey at virgo.sdc.org
Thu Aug 8 14:02:43 EDT 2013
On Thu, Aug 08, 2013 at 07:24:16AM -0400, Bill Pierce wrote:
> I was still talking about paths.
OK.
> I guess what I was asking is if the paths need to be reset after the forked program exits so the calling program can continue to print, read & write normally.
> I think you answered that saying the paths reset to normal after the fork.
Well, no, you have to reset them, the same way you set up the paths in
the first place. Use close and dup to put stdin and stdout back on
paths 0 and 1. (Look at lootterm2 again, the first thing it does after
os9fork() is put its paths back the way they started.)
> In this case, I assume if I fork the program again, I need to do the whole "pipe"/"dup" routine again?
That you would have to experiment with... I'm not sure.
> Thanks again
No problem!
Willard
--
Willard Goosey goosey at sdc.org
Socorro, New Mexico, USA
I search my heart and find Cimmeria, land of Darkness and the Night.
-- R.E. Howard
More information about the Coco
mailing list