libjobserver – v0.2.0 Handle parallel jobs in a build automation application compatible with GNU Make code.malloc.fr

NAME

jobserver_terminate_job - terminate a job collected with wait(2)

SYNOPSIS

#include <jobserver.h>

int jobserver_terminate_job(struct jobserver * js, pid_t pid, int status);

DESCRIPTION

A call to jobserver_terminate_job() cleans up the child properly by calling the jobserver_callback_return_t callback (see jobserver_launch_job(3)) that was associated with it with status as its argument, and remove it from jobserver js.

RETURN VALUE

On success, 0 is returned. On error, -1 is returned and errno is set accordingly.

ERROR

ECHILD

Process pid was not started with jobserver_launch_job(3).

SEE ALSO

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_getenv(3), jobserver_setenv(3), jobserver_unsetenv(3), jobserver_wait(3)