diff --git a/doc/man/man3/slurm_error.3 b/doc/man/man3/slurm_error.3 new file mode 100644 index 0000000000000000000000000000000000000000..f94197da022e5b76e6e99fb71e381e4766851a31 --- /dev/null +++ b/doc/man/man3/slurm_error.3 @@ -0,0 +1,54 @@ +.TH "Slurm API" "3" "Release 0.0.0" "Morris Jette" "Slurm error calls" +.SH "NAME" +.LP +\fBslurm_job\fR \- Slurm error calls +.SH "SYNTAX" +.LP +#include <slurm.h> +.LP +int \fBslurm_get_errno\fR ( ); +.LP +char * \fBslurm_strerror\fR ( +.br + int \ferrnum\fP +.br +); +.LP +void \fBslurm_perror\fR ( +.br + char *\fImsg\fP +.br +); +.SH "ARGUMENTS" +.LP +.TP +\fIerrnum\fP +A Slurm error code. +.TP +\fImsg\fP +TBD. +.SH "DESCRIPTION" +.LP +\fBslurm_get_errno\fR Return the error code as set by a Slurm API function. +.LP +\fBslurm_strerror\fR Given a Slurm error code, return a descriptive text. +.LP +\fBslurm_perror\fR TBD. +.SH "RETURN VALUE" +.LP +On success, zero is returned. On error, -1 is returned, and errno is set appropriately. +.SH "ERRORS" +.LP +\fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re-link your code. +.SH "EXAMPLE" +.eo +.LP +#include <stdio.h> +.br +#include <slurm.h> +.LP +int main (int argc, char *argv[]) +.br +{ +} +.ec diff --git a/doc/man/man3/slurm_info.3 b/doc/man/man3/slurm_info.3 index 4e7848ff4f8659b5108e3508ce8ef3ae27bd8403..b965dc2c64d87d02c752b81a1f07eb4d59256dcf 100644 --- a/doc/man/man3/slurm_info.3 +++ b/doc/man/man3/slurm_info.3 @@ -140,7 +140,7 @@ int main (int argc, char *argv[]) .br if ( slurm_load_ctl_conf ((time_t) NULL, &conf_info_msg_ptr ) ) { .br - printf ("slurm_load_ctl_conf errno %d\n", errno); + printf ("slurm_load_ctl_conf errno %d\n", slurm_get_errno()); .br exit (1); .br @@ -156,7 +156,7 @@ int main (int argc, char *argv[]) .br if ( slurm_load_jobs ((time_t) NULL, &job_buffer_ptr) ) { .br - printf ("slurm_load_jobs errno %d\n", errno); + printf ("slurm_load_jobs errno %d\n", slurm_get_errno()); .br exit (1); .br @@ -182,7 +182,7 @@ int main (int argc, char *argv[]) .br if ( slurm_load_node ((time_t) NULL, &node_buffer_ptr) ) { .br - printf ("slurm_load_node errno %d\n", errno); + printf ("slurm_load_node errno %d\n", slurm_get_errno()); .br exit (1); .br @@ -206,7 +206,7 @@ int main (int argc, char *argv[]) .br if ( slurm_load_partitions ((time_t) NULL, &part_buffer_ptr) ) { .br - printf ("slurm_load_part errno %d\n", errno); + printf ("slurm_load_part errno %d\n", slurm_get_errno()); .br exit (1); .br @@ -258,5 +258,5 @@ int main (int argc, char *argv[]) .ec .SH "SEE ALSO" .LP -\fBslurm_strerror\fR(3), \fBslurm_perror\fR(3) +\fBslurm_get_errno\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3) diff --git a/doc/man/man3/slurm_job.3 b/doc/man/man3/slurm_job.3 index b8fa07ec1bd4ba196e804691f1a91bb05f0a96c6..f0fae356dba99bec2dcceee1aa828d02bd993f96 100644 --- a/doc/man/man3/slurm_job.3 +++ b/doc/man/man3/slurm_job.3 @@ -16,7 +16,7 @@ int \fBslurm_allocate_resources\fR ( .br ); .LP -void \fBslurm_cancel_job\fR ( +int \fBslurm_cancel_job\fR ( .br uint32_t \fIjob_id\fP .br @@ -149,6 +149,8 @@ On success, zero is returned. On error, -1 is returned, and errno is set appropr \fBESLURM_TRANSITION_STATE_NO_UPDATE\fR the requested job configuration change can not take place at this time. Try again later. .LP \fBESLURM_ALREADY_DONE\fR the specified job has already completed and can not be modified. +.LP +\fBESLURM_ACCESS_DENIED\fR the requesting user lacks authorization for the requested action (e.g. trying to delete or modify another user's job). .SH "EXAMPLE" .eo .LP @@ -176,7 +178,7 @@ int main (int argc, char *argv[]) .br if (slurm_allocate_resources(&job_desc_msg,&slurm_alloc_msg_ptr,true)) { .br - printf ("allocate errno %d\n", errno); + printf ("allocate errno %d\n", slurm_get_errno()); .br exit (1); } @@ -187,7 +189,7 @@ int main (int argc, char *argv[]) .br if ( slurm_job_cancel ( slurm_alloc_msg_ptr->job_id ) ) { .br - printf ("cancel errno %d\n", errno); + printf ("cancel errno %d\n", slurm_get_errno()); .br exit (1); .br @@ -203,4 +205,4 @@ int main (int argc, char *argv[]) .ec .SH "SEE ALSO" .LP -\fBslurm_load_jobs\fR(3), \fBslurm_free_job_info\fR(3), \fBslurm_strerror\fR(3), \fBslurm_perror\fR(3) +\fBslurm_free_job_info\fR(3), \fBslurm_get_errno\fR(3), \fBslurm_load_jobs\fR(3), \fBslurm_perror\fR(3), \fBslurm_strerror\fR(3)