Home Corporate Contacts TETware Java API Overview |
ProductsSolutionsInformationDatasheetDocumentationFAQKnowledgebase |
11. Generating and Executing ProcessesIntroductionThese methods enable API-conforming sub-programs to be created and administered. tet_spawn() and tet_jspawn()Synopsis
Description A call to tet_spawn() creates a new sub-program that will use the C API. A call to tet_jspawn() creates a new sub-program that will use the Java API. The interface between these methods and the sub-program launched by them has been designed to enable the sub-program to use a TETware API. Therefore, a sub-program launched by a call to tet_spawn() must be built with the C API's child process controller. Likewise, the class specified by classname in a call to tet_jspawn() must be a subclass of ChildTestCase and must use the Java API's child process controller. Return value Both tet_spawn() and tet_jspawn() return the process identifier of the newly created process. Exceptions tet_spawn() and tet_jspawn() each throw a TetException object if the API encounters an error while creating the new sub-program. Application notes The implementation of tet_jspawn() uses a helper program called jet-spawn which resides in tet-root/bin in the TETware distribution. If this program cannot be executed for any reason, a call to tet_jspawn() will fail. Portability Refer to the corresponding section in the chapter entitled "The C API" in the TETware Programmers Guide. tet_wait()Synopsis
Description A call to tet_wait() waits for the process identified by pid to terminate. pid is the process identifier returned by a previous successful call to tet_spawn() or tet_jspawn(). Return value A call to tet_wait() returns the exit status of the process identified by pid. Exceptions tet_wait() throws a TetException object if the API encounters an error while waiting for the process to terminate. Portability Refer to the corresponding section in the chapter entitled "The C API" in the TETware Programmers Guide. tet_kill()Synopsis
Description A call to tet_kill() sends the signal specified by sig to the process specified by pid, which should be the process identifier returned by a previous successful call to tet_spawn() or tet_jspawn(). Return value This method does not return a value. Exceptions tet_kill() throws a TetException object if the API encounters an error while sending the signal to the process. Portability Refer to the corresponding section in the chapter entitled "The C API'' in the TETware Programmers Guide. Application notes Refer to the corresponding section in the chapter entitled "The C API'' in the TETware Programmers Guide. |