Hello all,
I have just noticed that system() function in Unicon didn't redirect output under Win8.1.
There is a simple example:
program main()
path := "c:\\*.*"
cmd := "cmd.exe /cdir /a-d /on /b "||path
output := getenv("TMP")||"\\temp.tmp"
system(cmd, &input, output)
f := open(output, "r")
every write("+",read(f))
close(f)
end
This program shall list files in the root directory of C: disk. It lists, but not as supposed!
Output file "temp.tmp" is created but it is empty! Instead of writing output to this file it is printed to &output.
If I'll slightly change this code (redirect output in the command itself)
...
system(cmd||" >"||output)
...
and compile this with Icon all will work fine. But not with Unicon. What receipts?
Best regards,
Sergey Logichev
------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________ Unicon-group mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/unicon-group
