[drmaa-wg] buffer length/size

Peter Troeger peter.troeger at hpi.uni-potsdam.de
Wed Jun 28 07:42:43 CDT 2006


This one is for the SGE bug tracker ?

> ... and as I see in SGE's DRMAA implementation[1], all the _len
> arguments are treated as maximum string lengths, thus the input buffer
> is always considered to have size of (job_id_len + 1).
>
> So, to sum up, should implementations treat these arguments as size of
> the buffer or the maximum string length that would be put into the
> buffer?
>
> [1] By the way: some comments in the code are a bit misleading:
>
>   OUTPUTS
>      char *job_id             - buffer for resulting jobid
>      size_t job_id_len        - size of job_id buffer
>      char *error_diagnosis    - diagnosis buffer
>      size_t error_diag_len    - diagnosis buffer length
>
> The "size of job_id buffer" seems completly wrong, whereas "buffer
> length" is not a clear wording from the C language perspective.

The overall naming issue is now filed as tracker item:

https://forge.gridforum.org/sf/go/artf5493?nav=1

Peter.





More information about the drmaa-wg mailing list