Yet more on this, I've been experimenting with use of
system(cmd[], infile, outfile, errfile [waitflag]) and although it is coping with a large effective command line (ie around 500) it seems to be losing the last member of the cmd[] list when used in list form. This is on Windows; I haven't yet tested on *nix. I've noticed a few other apparent problems with this call on Windows: * output of the called process doesn't appear to go into the outfile parameter - something I created by calling the pipe() function. The output just pumps to the console from the .icx when it starts running. * the executable (cmd[1]) is not searched for on the path. * I can't seem to get it to recognise .icx as a valid executable even after registering .icx as an executable shell extension. * in list form, if the various args contain spaces or unpleasantly placed quotes, the argv of the .icx is broken at those args. If at all possible (ie if Windows is in any way capable) I would hope that it can behave soberly and properly like exec() on *nix. * waitflag just waits for the process to initiate on windows. Using "nowait" means it doesn't even wait for startup, so you get no clue from the error return about successful or failed startup. Also I can't make sense of the returned value; it's &null when "nowait" is used, or a mysterious number like 1 when "nowait" is not used. Windows doesn't seem to have a decent fork/exec/wait model that matches Unix, so I sympathise with the authors on this point. I don't know if it's achievable, but I expect "nowait" even on windows should at least wait for successful startup and report on that, and if the code asks for waiting, it really should wait. I'm interested to know what could be done with the returned process id on Unix. I can't see any sort of wait() function available in Unicon to use. ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ Unicon-group mailing list Unicon-group@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/unicon-group