esh: don't create jobs from & commands when not interactive

This commit is contained in:
K. Lange 2018-10-29 13:04:19 +09:00
parent 9a6a5ce9c1
commit d26129ce39

View File

@ -1301,8 +1301,10 @@ _nope:
}
if (nowait) {
fprintf(stderr, "[%d] %s\n", pgid, arg_starts[0][0]);
hashmap_set(job_hash, (void*)pgid, strdup(arg_starts[0][0]));
if (shell_interactive == 1) {
fprintf(stderr, "[%d] %s\n", pgid, arg_starts[0][0]);
hashmap_set(job_hash, (void*)pgid, strdup(arg_starts[0][0]));
}
free(cmd);
return 0;
}