Synopsis:
ret_code=task_chain(task_name[, arg1 [, arg2[,..arg15]]]])
Arguments:
task_name – The name of the task to spawn (with or without the .TEX) extension)
arg1..arg15 – Optional arguments to pass to spawned task (up to 15)
Description: This function creates a new task from the compiled byte code file given in task_name and kills the calling task if the new task is started successfully.
If the .TEX extension is omitted it will be added automatically.
If the TEXDIR environment variable is set, then the semi-colon delimited list of directories specified in this environment variable will be searched in order for the file specified in task_name. If TEXDIR is not set then the only current directory will be searched.
If any of arg1..arg15 are specified then these arguments will be passed to the new task which can then be read using the task_arg() function.
The function call will only return if it cannot start the new task for any reason (e.g. invalid file name or file not in TEXDIR directory path). If the task starts successfully then the calling task is immediately killed.
Return Value:
The function will only return if it fails in which case it returns a negative error code.