aboutsummaryrefslogtreecommitdiff
path: root/include/handler.h
blob: 100c5483196ddd461b774c46d38e408f9c049db5 (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

#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 "all.h"

namespace ov4
{

typedef void handler_t(int);

extern sigset_t 
    block_sig_TTOU,
    block_job,
    block_io;

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);

}