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); open("CON", O_WRONLY);
should do but there are also ways to 'save' the original stdout and
restore it later.  Get him to contact me for details.

On 9/16/06, Johnson Lam <[EMAIL PROTECTED]> wrote:
> 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 do it this way:
>
> TestDir2.bat:
> command /c dir /b c:\testdir >d:\dirout.put
>
> The file dirout.put has the directory output but CUT... it never
> reaches the end of the output, it just cuts...
>
> Tried with many command coms and kernel versions...
>
> I really need to do it that way because I'm using the system()
> function on my C program and it runs "command /c" with what to run as
> an argument.
>
> Any ideas on that?
>
> Kind regards,
> Marton
> ====
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
>


-- 
Fall is my favorite season in Los Angeles, watching the birds change
color and fall from the trees.
   David Letterman (1947 - )

See ya

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to