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

Reply via email to