void showProgressWindow() { startJob(); if (isCanceled()) m_fop->stop(); waitJob(); }
void showProgressWindow() { startJob(); if (isCanceled()) fop_stop(m_fop); waitJob(); }
void putJobForeground(t_job* job, int continueJob) { job->status = FOREGROUND; tcsetpgrp(MSH_TERMINAL, job->pgid); if (continueJob) { if (kill(-job->pgid, SIGCONT) < 0) perror("kill (SIGCONT)"); } waitJob(job); tcsetpgrp(MSH_TERMINAL, MSH_PGID); }
/** * puts a job in foreground. If continueJob = TRUE, sends the process group * a SIGCONT signal to wake it up. After the job is waited successfully, it * restores the control of the terminal to the shell */ void putJobForeground(t_job* job, int continueJob) { job->status = FOREGROUND; // set its status in the list as FOREGROUND tcsetpgrp(RSH_TERMINAL, job->pgid); // give it the control of the terminal if (continueJob) { // continue the job (if desired) if (kill(-job->pgid, SIGCONT) < 0) // by sending it a SIGCONT signal perror("kill (SIGCONT)"); } waitJob(job); // wait for the job tcsetpgrp(RSH_TERMINAL, RSH_PGID); // give the shell control of the terminal }