~emersion/mrsh

ref: bae66ff12baba00898fae84b5173504754252248 mrsh/include/shell/shell.h -rw-r--r-- 561 bytes View raw
bae66ff1Simon Ser Create a job when executing a subshell 1 year, 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef SHELL_SHELL_H
#define SHELL_SHELL_H

#include <mrsh/shell.h>
#include "job.h"
#include "process.h"

/**
 * A context holds state information and per-job information. A context is
 * guaranteed to be shared between all members of a job.
 */
struct context {
	struct mrsh_state *state;
	// When executing a pipeline, this is set to the job created for the
	// pipeline
	struct mrsh_job *job;
	// When executing an asynchronous list, this is set to true
	bool background;
};

pid_t subshell_fork(struct context *ctx, struct process **process_ptr);

#endif