jobserver_getenv, jobserver_setenv, jobserver_unsetenv - access the jobserver environment variable
#include <jobserver.h>
int jobserver_getenv(struct jobserver * js);
int jobserver_setenv(struct jobserver const * js);
int jobserver_unsetenv(struct jobserver const * js);
The jobserver_getenv(), jobserver_setenv(), and jobserver_putenv() functions respectively fetch, set and erase a jobserver js from the environment.
The dry_run, debug, and keep_going statuses of jobserver js (see jobserver(7)), if present, are always collected or set even when the jobserver is unset.
On success, these functions return 0. On error, -1 is returned and errno is set accordingly.
(jobserver_getenv()) One of the token pipe file descriptor is invalid.
(jobserver_setenv(), jobserver_unsetenv()) Not enough memory to add or change the MAKEFLAGS environment variable.
(jobserver_getenv()) Error while parsing the environment.
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
jobserver_getenv() | Thread safety | MT-Safe env, locale |
jobserver_setenv() | Thread safety | MT-Unsafe const:env |
jobserver_unsetenv() | Thread safety | MT-Unsafe const:env |
jobserver(7), jobserver_clear(3), jobserver_collect(3), jobserver_connect(3), jobserver_close(3), jobserver_create(3), jobserver_create_n(3), jobserver_launch_job(3), jobserver_print(3), jobserver_terminate_job(3), jobserver_wait(3)