David,
Just to compare with Linux, (running Fedora 12), I ran you program
after changing system.exe to system and fixing the second "nowait" to be
"wait", here is what I got. How is that different from what you are getting
?
[ja...@precision projects]$ ./system
Unicon Version 11.7. January 22, 2010
Select
- dir
- dir-nowait
- dir-wait
dir
system.icn : 14 | SYSTEM(list_2 = ["dir system.icn"])
system.icn
system.icn : 20 | SYSTEM returned 0
exit code=0
system.icn : 18 main failed
[ja...@precision projects]$ ./system
Unicon Version 11.7. January 22, 2010
Select
- dir
- dir-nowait
- dir-wait
dir-nowait
system.icn : 15 | SYSTEM(list_2 = ["dir
system",&input,&output,&errout,"nowait"])
system.icn : 20 | SYSTEM returned 2338
Child PID.1=2338
system.icn : 18 main failed
[ja...@precision projects]$ ./system
Unicon Version 11.7. January 22, 2010
Select
- dir
- dir-nowait
- dir-wait
dir-wait
system.icn : 16 | SYSTEM(list_2 = ["dir
system",&input,&output,&errout,"wait"])
system
system.icn : 20 | SYSTEM returned 0
Child PID.2=0
system.icn : 18 main failed
[ja...@precision projects]$
Jafar
On Sun, Aug 1, 2010 at 8:47 AM, David Gamey <[email protected]> wrote:
> Folks,
>
> The system function is behaving unexpectedly:
>
> - system("dir...") works but returns -1 - not sur if that's normal
> - system() with wait and nowait works but fail.
>
> Version gives: Unicon Version 11.7. January 22, 2010
>
> The program below illustrates:
>
> procedure main()
> write(&version)
> SYSTEM :=: system
> &trace := -1
> SEL := ["dir","dir-nowait","dir-wait"]
> until \op do {
> write("Select")
> every write("- ",!SEL)
> opt := read()
> if opt == !SEL then break
> }
>
> case opt of {
> SEL[1]:write("exit code=",system("dir system.icn"))
> SEL[2]:write("Child PID.1=",system("dir
> system.exe",&input,&output,&errout,"nowait"))
> SEL[3]:write("Child PID.2=",system("dir
> system.exe",&input,&output,&errout,"nowait"))
> }
> end
>
> procedure SYSTEM(x[]); return SYSTEM!x; end
>
> David
>
>
> ------------------------------------------------------------------------------
> The Palm PDK Hot Apps Program offers developers who use the
> Plug-In Development Kit to bring their C/C++ apps to Palm for a share
> of $1 Million in cash or HP Products. Visit us here for more details:
> http://p.sf.net/sfu/dev2dev-palm
> _______________________________________________
> Unicon-group mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/unicon-group
>
>
--
"Let there be no compulsion in religion: Truth stands out clear from error"
[The Holy Qur'an 2:256]
"Injustice anywhere is a threat to justice everywhere" Dr. King
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group