This is the text under job_name: A job name SHALL comprise alphanumeric and _ characters. The drmaa-implementation SHALL NOT provide the client with a job name longer than DRMAA_JOBNAME_BUFFER -1 (1023) characters. The drmaa-implementation MAY truncate any client-provided job name to an implementation-defined length that is at least 31 characters. The attribute name is drmaa_job_name In the 3.1.1. section we have: The length of any output context-specific error string SHALL NOT exceed DRMAA_ERROR_STRING_BUFFER. --- Adding including the null character for languages that have no support for String objects found in OO languages (or something similar) should make the text clear. Hrabri
-----Original Message----- From: drmaa-wg-bounces@ogf.org [mailto:drmaa-wg-bounces@ogf.org] On Behalf Of Rajic, Hrabri Sent: Tuesday, May 01, 2007 9:13 PM To: drmaa-wg@ogf.org Subject: [DRMAA-WG] Torque/PBS DRMAA - buffer size, string size
Issue:
There is a confusion regarding *_len input parameters (e.g. error_diag_len for error messages): whether they should include 1 additional byte for '\0' character or not.
C binding specification makes it even more ambiguous. It uses the term "buffer length" which might be not clear for a C programmer. Usually "buffer size" means sizeof(buf) and "string length" means that one needs to supply sizeof(buf) - 1 as the argument for function call. It would be good to see some explicit explanation. ---------------
sizeof(buf) - 1 is meant to be used, since the programmers expect this behavior.
That needs to be clarified in the spec wherever matters to leave no room for ambiguities.
-Hrabri -- drmaa-wg mailing list drmaa-wg@ogf.org http://www.ogf.org/mailman/listinfo/drmaa-wg