xsecurelock 1.8.0
XSecureLock is an X11 screen lock utility.
Loading...
Searching...
No Matches
wait_pgrp.h
Go to the documentation of this file.
1/*
2Copyright 2018 Google Inc. All rights reserved.
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16
17#ifndef WAIT_PGRP_H
18#define WAIT_PGRP_H
19
20#include <limits.h> // for INT_MIN
21#include <unistd.h> // for pid_t
22
23#define WAIT_ALREADY_DEAD INT_MIN
24#define WAIT_NONPOSITIVE_SIGNAL (INT_MIN + 1)
25
31void InitWaitPgrp(void);
32
37pid_t ForkWithoutSigHandlers(void);
38
47void StartPgrp(void);
48
57int ExecvHelper(const char *path, const char *const argv[]);
58
65int KillPgrp(pid_t pid, int signo);
66
80int WaitPgrp(const char *name, pid_t *pid, int do_block, int already_killed,
81 int *exit_status);
82
95int WaitProc(const char *name, pid_t *pid, int do_block, int already_killed,
96 int *exit_status);
97
98#endif
char *const * argv
Args.
Definition auth_x11.c:67
void StartPgrp(void)
Starts a new process group.
Definition wait_pgrp.c:83
int WaitPgrp(const char *name, pid_t *pid, int do_block, int already_killed, int *exit_status)
Waits for the given process group to terminate, or checks its status. If the leader process died,...
Definition wait_pgrp.c:149
int KillPgrp(pid_t pid, int signo)
Kills the given process group.
Definition wait_pgrp.c:133
int ExecvHelper(const char *path, const char *const argv[])
Spawns a helper process.
Definition wait_pgrp.c:116
int WaitProc(const char *name, pid_t *pid, int do_block, int already_killed, int *exit_status)
Waits for the given process to terminate, or checks its status.
Definition wait_pgrp.c:161
void InitWaitPgrp(void)
Initializes WaitPgrp.
Definition wait_pgrp.c:36
pid_t ForkWithoutSigHandlers(void)
Fork a subprocess, but do not inherit our signal handlers.
Definition wait_pgrp.c:46