blob: 71db1b971bc19194b07774c51cff4f20897a871a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include <atomic>
#include "all.h"
namespace ov4
{
typedef void handler_t(int);
extern sigset_t
block_sig_TTOU,
block_job,
block_io;
inline std::atomic_int exit_code, exit_required_pid;
inline constexpr int SIGNAL_EXIT_CODE_BASE = 128;
void signal_init();
handler_t *Signal(int signum, handler_t *handler);
void sigchld_handler(int sig);
void sigint_handler(int sig);
void sigtstp_handler(int sig);
void sigquit_handler(int sig);
int block_all(sigset_t *prev);
int block_handler(sigset_t *prev);
}
|