cached_record::cached_record(const std::string &key, db_record *rec, cr_cache *cache) :_key(key),_rec(rec),_cache(cache) { update_last_use(); }
static void wait_for_job(t_config *conf, t_job *job) { int status; update_last_use(conf->head_job, job); if (kill(job->pgid, SIGCONT) < 0) my_puterr("Error: kill (SIGCONT)\n"); job->head_process->is_stopped = 0; waitpid(job->pgid, &status, WUNTRACED); if (WIFSTOPPED(status)) job->head_process->is_stopped = 1; else job->head_process->is_finish = 1; signal_display(status); if (tcsetpgrp(STDIN_FILENO, getpgid(getpid())) == -1) my_puterr("Error: tcsetpgrp\n"); if (tcsetattr(STDIN_FILENO, TCSADRAIN, &conf->tmodes) == -1) my_puterr("Error: tcsetattr\n"); }