Date: Thu, 27 Apr 1995 10:01:06 -0400 From: kagel AT quasar DOT bloomberg DOT com To: djgpp AT sun DOT soe DOT clarkson DOT edu Reply-To: kagel AT ts1 DOT bloomberg DOT com OK, here is a weird one. I have a sort utility I wrote and ported to DJGPP. It works fine, however, to print out extended help in response to a command line error it popen()'s a pager, usually DOS' more but I have also used a poor man's pg I wrote with the same result. If executed as follows everything is fine and the pager gets the fprintf()'d text and displays it OK: go32 asksort -- or even -- go32 /bin/asksort However, if executed as follows (with the disk spec.), or when executing the coff2exe bound or stub'ed versions (all three binding options: stub only [-g], bind w/stub, and bind with go32 [-s]; behave the same) the pager gets no input while the running time would indicate that the sort app is indeed writing: go32 c:/bin/asksort --or-- go32 c:\bin\asksort Note that all versions display the 'Invalid arguments' message to stderr directly, which includes argv[0]. The bound versions display a full path with disk spec. (ie: c:/bin/asksort) for argv[0] while (if memory serves) when go32 is explicitly run and passed the exec name without disk spec argv[0] is also printed without the disk spec. The inclusion of the disk spec, either explicitly to go32 or implicitly, by the bound go32 or stub.exe, seems to be the problem. Please do not remind me of DOS's brain dead implementation of pipes using temp files unless you have some insight that that is the specific problem, I had to cope with it for nine years before concentrating my work on UNIX seven years ago. I have a suspicion that the temp file may be being created in the wrong place for the pager to find it later, or perhaps with the wrong name, but at 2AM I went to sleep rather than investigate further. I will disable my cache to see if there are writes happening and try to undelete the temp file to track this down when I get home tonight. Meantime, anybody have any ideas? Is this a popen() bug? DOS problem? Gremlin? -- Art S. Kagel, kagel AT ts1 DOT bloomberg DOT com