99e5da430d5f526c1c235d8ad12ea490e1c52662 — Simon Ser 1 year, 9 months ago 82c4ff0
shell/job: silence job_set_foreground warning

When job control has been turned off because of entering into a child
process, don't print a warning when calling job_set_foreground.
2 files changed, 2 insertions(+), 1 deletions(-)

M shell/job.c
M shell/task/word.c
M shell/job.c => shell/job.c +0 -1
@@ 145,7 145,6 @@ bool job_set_foreground(struct mrsh_job *job, bool foreground, bool cont) {
	assert(job->pgid > 0);

	if (!priv->job_control) {
		fprintf(stderr, "job_set_foreground called with job control disabled\n");
		return false;

M shell/task/word.c => shell/task/word.c +2 -0
@@ 106,6 106,8 @@ static int run_word_command(struct mrsh_context *ctx, struct mrsh_word **word_pt
		dup2(fds[1], STDOUT_FILENO);


		// When a subshell is entered, traps that are not being ignored shall
		// be set to the default actions, except in the case of a command
		// substitution containing only a single trap command, when the traps