aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-19 18:09:58 +0200
committerMattias Andrée <maandree@kth.se>2016-07-19 18:09:58 +0200
commit1d9d69c7f3f69721d030219915c87a9ce343ae7b (patch)
treec428f6cfeb37f3cb89843ea1308e13ccdbf15bb6 /doc
parentm (diff)
downloadlibcoopgamma-1d9d69c7f3f69721d030219915c87a9ce343ae7b.tar.gz
libcoopgamma-1d9d69c7f3f69721d030219915c87a9ce343ae7b.tar.bz2
libcoopgamma-1d9d69c7f3f69721d030219915c87a9ce343ae7b.tar.xz
Add libcoopgamma_get_pid_file.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'doc')
-rw-r--r--doc/man/libcoopgamma_get_pid_file.381
1 files changed, 81 insertions, 0 deletions
diff --git a/doc/man/libcoopgamma_get_pid_file.3 b/doc/man/libcoopgamma_get_pid_file.3
new file mode 100644
index 0000000..1d7dc8e
--- /dev/null
+++ b/doc/man/libcoopgamma_get_pid_file.3
@@ -0,0 +1,81 @@
+.TH LIBCOOPGAMMA_GET_PID_FILE 3 LIBCOOPGAMMA
+.SH "NAME"
+libcoopgamma_get_pid_file - Get the PID file of the coopgamma server
+.SH "SYNOPSIS"
+.nf
+#include <libcoopgamma.h>
+
+char *libcoopgamma_get_pid_file(const char *restrict \fImethod\fP, const char *restrict \fIsite\fP);
+.fi
+.P
+Link with
+.IR -lcoopgamma .
+.SH "DESCRIPTION"
+The
+.BR libcoopgamma_get_pid_file ()
+function consults
+.BR coopgammad (1)
+to get the pathname of the PID file for the
+.BR coopgammad (1)
+instance for the selected adjustment
+.I method
+and
+.IR site .
+If
+.I method
+or
+.I site
+is
+.IR NULL ,
+the it will selected automatically.
+.P
+For the duration of the function call,
+.I SIGCHLD
+most neither be ignored nor blocked. It is the
+user of this library's responsibility to ensure
+this. The
+.BR libcoopgamma_get_pid_file ()
+function will not temporarily reset handling of
+.I SIGCHLD
+itself.
+.SH "RETURN VALUES"
+The
+.BR libcoopgamma_get_pid_file ()
+function the pathname of the PID file on success.
+Success does not mean that the server has the
+running at the moment. The user should free
+the returned pointer. On error,
+.I NULL
+is returned and
+.I errno
+is set appropriately.
+.SH "ERRORS"
+The
+.BR libcoopgamma_get_pid_file ()
+function may fail for any reason specified for
+.BR pipe (3),
+.BR fork (3),
+.BR dup2 (3),
+.BR execvp (3),
+.BR malloc (3),
+.BR realloc (3),
+.BR read (3)
+(other than
+.IR EINTR ),
+and
+.BR waitpid (3).
+The function may also fail for any of the
+following reasons:
+.TP
+.B EINVAL
+If
+.I method
+contain an invalid adjustment method name.
+.TP
+.B EBADMSG
+.BR coopgammad (1)
+output invalid data to stdout.
+.SH "SEE ALSO"
+.BR libcoopgamma_get_methods (3),
+.BR libcoopgamma_get_socket_file (3),
+.BR libcoopgamma_connect (3)