diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2021-04-26 00:03:44 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2021-04-26 00:07:23 +0200 |
commit | 9e9821715a753602454a2890494e99201a141b45 (patch) | |
tree | e28eb27c6efb8e3d8b0a6e5004a8c2eaa889ff68 /drmaa | |
parent | 879cc493c321f53177e6b8159676dc2959595208 (diff) |
low: wait: Return more useful values.
* drmaa/v1/low.scm (wait): Dereference string pointer for job
identifier; return list of plain exit values instead of the opaque
bytestructure.
Diffstat (limited to 'drmaa')
-rw-r--r-- | drmaa/v1/low.scm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drmaa/v1/low.scm b/drmaa/v1/low.scm index 55fe3fd..09628ed 100644 --- a/drmaa/v1/low.scm +++ b/drmaa/v1/low.scm @@ -499,7 +499,7 @@ TIMEOUT (an integer) specifies the number of seconds to block. If it is not provided or is #FALSE this procedure will block forever. This procedure returns three values: the identifier of the job that -has completed, the status code of the job (an opaque value), and an +has completed, a list of keyword-indexed status information, and an alist of resource usage statistics." (let ((timeout (or timeout (DRMAA 'TIMEOUT_WAIT_FOREVER))) @@ -523,8 +523,14 @@ alist of resource usage statistics." (pointer-to rusage) error-message (DRMAA 'ERROR_STRING_BUFFER)) - (values job-id-out - status-code + (values (char*->string job-id-out) + (let ((code (fh-object-ref status-code))) + (list #:exit-status (w-exit-status code) + #:coredump? (w-coredump? code) + #:exited? (w-if-exited? code) + #:aborted? (w-if-aborted? code) + #:signaled? (and (w-if-signaled? code) + (w-termsig code)))) (map (lambda (value) (or (and=> (string-index value #\=) (lambda (split-point) |