[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] user job wrapper: payload exit code / multiprocessing

Hi all,

within a USER_JOB_WRAPPER I would like to evaluate the user job's exit
code after the payload has finished - which AFAIS does not work with
bash's exec as required [1].

While I could start the user job in a (bash) subshell/forking it, there
seems to be no way to pass the 'correct' (user job's) exit code and
stdout/stderr back to the starter, or?
While catching a subshell's exit code would work, I found no obvious way
how to get stdout and stderr into separate variables to hand them
through to the condor_starter.

So, I have been thinking to go for python's multiprocessing to start the
user job in a separate process, let the wrapper live in parallel [2] and
process the payload's output afterwards.

Would such an approach work or is there something else I have missed?

Cheers and thanks,

"This wrapper script must ultimately replace its image with the user
job; thus, it must exec() the user job, not fork() it"

and maybe monitor in parallel - but which probably better covered by a
startd cron hook...

On 2016-11-01 15:55, Thomas Hartmann wrote:
> Hi all,
> just a (hopefully) quick question on how to run separate global pre/post
> job scripts preserving the payload environment?
> I.e., something like +PreCmd and +PostCMD but with USER_JOB_WRAPPER?
> As far as I see it
> http://research.cs.wisc.edu/htcondor/manual/v8.5/3_3Configuration.html#SECTION004312000000000000000
> one way might be to have the USER_JOB_WRAPPER script to call the payload
> as last but one
>   exec "$@"
> before executing a 'post-cmd' script?
> But I guess I won't get the full environment of the job as with PostCmd, or?
> Cheers,
>   Thomas
> _______________________________________________
> HTCondor-users mailing list
> To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
> subject: Unsubscribe
> You can also unsubscribe by visiting
> https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
> The archives can be found at:
> https://lists.cs.wisc.edu/archive/htcondor-users/

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature