Remove proc_last_bg_pid

It wasn't used.
This commit is contained in:
ridiculousfish 2018-11-03 19:28:16 -07:00
parent 0373a87867
commit 93aa95d8c4
3 changed files with 1 additions and 6 deletions

View file

@ -1101,8 +1101,7 @@ void exec_job(parser_t &parser, shared_ptr<job_t> j) {
j->set_flag(job_flag_t::CONSTRUCTED, true); j->set_flag(job_flag_t::CONSTRUCTED, true);
if (!j->is_foreground()) { if (!j->is_foreground()) {
proc_last_bg_pid = j->pgid; env_set_one(L"last_pid", ENV_GLOBAL, to_string(j->pgid));
env_set(L"last_pid", ENV_GLOBAL, { to_string(proc_last_bg_pid) });
} }
if (job_pushed) { if (job_pushed) {

View file

@ -83,7 +83,6 @@ bool is_block = false;
bool is_breakpoint = false; bool is_breakpoint = false;
bool is_login = false; bool is_login = false;
int is_event = false; int is_event = false;
pid_t proc_last_bg_pid = 0;
int job_control_mode = JOB_CONTROL_INTERACTIVE; int job_control_mode = JOB_CONTROL_INTERACTIVE;
int no_exec = 0; int no_exec = 0;

View file

@ -327,9 +327,6 @@ class job_iterator_t {
bool get_proc_had_barrier(); bool get_proc_had_barrier();
void set_proc_had_barrier(bool flag); void set_proc_had_barrier(bool flag);
/// Pid of last process started in the background.
extern pid_t proc_last_bg_pid;
/// The current job control mode. /// The current job control mode.
/// ///
/// Must be one of JOB_CONTROL_ALL, JOB_CONTROL_INTERACTIVE and JOB_CONTROL_NONE. /// Must be one of JOB_CONTROL_ALL, JOB_CONTROL_INTERACTIVE and JOB_CONTROL_NONE.