~emersion/mrsh

ref: 4b0435e60a86d710080ab7aac5b7ba8b23b29928 mrsh/include/shell/process.h -rw-r--r-- 391 bytes
4b0435e6emersion wip: job control 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef SHELL_PROCESS_H
#define SHELL_PROCESS_H

#include <stdbool.h>
#include <sys/types.h>

/**
 * A child process.
 */
struct process {
	pid_t pid;
	bool stopped;
	bool finished;
	int stat;
};

void process_init(struct process *process, pid_t pid);
void process_finish(struct process *process);
int process_poll(struct process *process);
void process_notify(pid_t pid, int stat);

#endif