On Tue, Jun 2, 2009 at 12:11 AM, Andrew Clarke <acla...@civica.com.au> wrote:
> 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. (I assume this is the Unix semantics issue that Clint mentioned, please let me know if I've overlooked the real point.) I did add a function "wait" that takes a pid. Does it not exist any more? This is the documentation for it: wait(pid, options) : status -- Wait for process to terminate or stop The options argument is a string constructed from the following characters: "n" NOHANG - don't wait for a child to terminate (wait will fail if there are no more) "u" UNTRACED - report status for untraced children also The return value is a string that represents the pid and the exit status as defined in this table: Unix equivalent example of returned string WIFSTOPPED(status) "1234 stopped:SIGTSTP" WIFSIGNALLED(status) "1234 terminated:SIGHUP" WIFEXITED(status) "1234 exit:1" WIFCORE(status) "1234 terminated:SIGSEGV:core" Currently the rusage facility is unimplemented. Defaults: pid Wait for all children -s -- "I hate to advocate drugs or alcohol to anyone, but they've always worked for me." ------------------------------------------------------------------------------ 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