[comp.sys.ibm.pc] Wierd EOF off console

martyl@rocksvax.UUCP (Marty Leisner) (10/12/87)

I've noticed an annoying and wierd problem using Dos 3.2 and Aztec C.  I think
its a Dos problem.

When I'm running a hierarchcy or spawned tasks, an EOF off the bottommost one on
stdin will cause an EOF on each parent task, generally causing them to exit
I bounce back to command.com.

The only way I've found out of this problem is to hardcode programs so on
EOF they would attempt to close/open the console device.

It seems dos must set some flag someplace, and the first read by each program
after the end of file to this device (/dev/con) gets an end of file.  Is there
a call to do something like "reset device inside dos?".

Has anyone else come across this?  I initially thought it was a bug in the
Aztec stream io package, but using straight read(fd, buffer, size) does the
same thing.  Any ideas?

I've done all sorts of kludgey stuff to attempt to fix this in the bottommost
task, but the only think which I've found works is to close/open stdin in each
task on EOF.

marty


-- 
marty leisner
xerox corp
leisner.henr@xerox.com
martyl@rocksvax.uucp