[Freedos-user] Need help ... calling COMMAND.COM from C

2006-09-16 Thread Johnson Lam
Hi, Please help Marton (marton=at=argentina.com), he stuck with a C program calling COMMAND.COM: Now that I moved onto my next step on my project, another issue arised... If I run this: TestDir.bat: dir /b c:\testdir d:\dirout.put The file dirout.put has the directory output... BUT, if I

Re: [Freedos-user] Need help ... calling COMMAND.COM from C

2006-09-16 Thread Blair Campbell
Hi. It almost sounds to me like the destination file isn't getting flushed to the disk. I would recommend doing the recirection internally in the C program, and then you have direct control of the file. A simple close(1); open(blah, O_WRONLY); /* system() stuff here: */ blah blah blah close(1);

Re: [Freedos-user] Need help ... calling COMMAND.COM from C

2006-09-16 Thread Johnson Lam
On Sat, 16 Sep 2006 02:29:02 -0700, you wrote: Hi Blair, Thanks. Sent him email. Hi. It almost sounds to me like the destination file isn't getting flushed to the disk. I would recommend doing the recirection internally in the C program, and then you have direct control of the file. A simple

Re: [Freedos-user] Need help ... calling COMMAND.COM from C

2006-09-16 Thread Arkady V.Belousov
Hi! 16-Сен-2006 02:29 [EMAIL PROTECTED] (Blair Campbell) wrote to freedos-user@lists.sourceforge.net: BC Hi. It almost sounds to me like the destination file isn't getting BC flushed to the disk. I would recommend doing the recirection BC internally in the C program, and then you have direct

Re: [Freedos-user] Need help ... calling COMMAND.COM from C

2006-09-16 Thread Blair Campbell
I did say that there were ways to save/restore the original stdout... I know that open(CON) is technically wrong, but at the same time it works in most cases. On 9/16/06, Arkady V.Belousov [EMAIL PROTECTED] wrote: Hi! 16-Сен-2006 02:29 [EMAIL PROTECTED] (Blair Campbell) wrote to

Re: [Freedos-user] Need help ... calling COMMAND.COM from C

2006-09-16 Thread Arkady V.Belousov
Hi! 16-Сен-2006 09:12 [EMAIL PROTECTED] (Blair Campbell) wrote to freedos-user@lists.sourceforge.net: BC I did say that there were ways to save/restore the original stdout... But you not explain this for man, to whom you answer. BC I know that open(CON) is technically wrong, but at the