~emersion/mrsh

ref: 1c6cbcf40da4e92c3c4fc5a2bb86b86d60accef1 mrsh/include/shell/process.h -rw-r--r-- 405 bytes
1c6cbcf4emersion ci: add an optimized build 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef SHELL_PROCESS_H
#define SHELL_PROCESS_H

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

/**
 * This struct is used to track child processes.
 */
struct process {
	pid_t pid;
	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