* Durga Deep Tirunagari <[EMAIL PROTECTED]> [2007-03-26 11:09]: > Hi Folks, > > We were recently developing a Cluster solution for our product. And we > are planning on using the isaexec approach. > > http://docs.sun.com/app/docs/doc/816-5138/6mba6ua5n?a=view > > Create Hardlinks to various executables and following the isaexec > approach of getexecname() and executing the appropriate binary > > isaexec does a (void) execve(mybinary, argv, envp); to execute the > actual binary. > > But how do I get the return value of the binary, I know that exec > family of functions won't return any value ?. Is there any way i can > get the return value of mybinary after it executes ?. Say if mybinary > returns 1 ( failure ) 2 ( success ) 4 ( some thing else )..
exec(2) replaces the running process image with a new image. So when mybinary calls exit(2), the exit status will be available to the parent via waitid(2). In your example, the parent would be the parent of the process which is calling isaexec(3C). - Stephen -- Stephen Hahn, PhD Solaris Kernel Development, Sun Microsystems [EMAIL PROTECTED] http://blogs.sun.com/sch/ _______________________________________________ opensolaris-discuss mailing list opensolaris-discuss@opensolaris.org