summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/sigchld.h
blob: 27d1adf4f0d2f94e1ab4e37a6c1a2392b12152f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef __SIGCHLD_H
#define __SIGCHLD_H

#include <pthread.h>
#include "list.h"

struct sigchld_handler_t
{
	struct list_head entry;
	pthread_mutex_t lock;
	pid_t pid;
	void (*handler)(struct sigchld_handler_t *, int status);
};

void sigchld_register_handler(struct sigchld_handler_t *);
void sigchld_unregister_handler(struct sigchld_handler_t *);
void sigchld_lock();
void sigchld_unlock();

#endif