~ubuntu-branches/ubuntu/utopic/slurm-llnl/utopic

« back to all changes in this revision

Viewing changes to src/srun/srun.c

  • Committer: Bazaar Package Importer
  • Author(s): Gennaro Oliva
  • Date: 2010-10-16 22:52:17 UTC
  • mfrom: (3.3.9 sid)
  • Revision ID: james.westby@ubuntu.com-20101016225217-4kr7l72wy6ssdnyd
Tags: 2.1.15-1
New upstream release 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1333
1333
        static time_t last_intr      = 0;
1334
1334
        static time_t last_intr_sent = 0;
1335
1335
 
1336
 
        if (!opt.quit_on_intr &&
1337
 
            (((time(NULL) - last_intr) > 1) && !opt.disable_status)) {
1338
 
                if (job->state < SRUN_JOB_FORCETERM)
 
1336
        if (!opt.quit_on_intr && ((time(NULL) - last_intr) > 1)) {
 
1337
                if  (opt.disable_status) {
 
1338
                        info("sending Ctrl-C to job %u.%u",
 
1339
                             job->jobid, job->stepid);
 
1340
                        slurm_step_launch_fwd_signal(job->step_ctx, SIGINT);
 
1341
                } else if (job->state < SRUN_JOB_FORCETERM) {
1339
1342
                        info("interrupt (one more within 1 sec to abort)");
1340
 
                else
 
1343
                        task_state_print(task_state, (log_f) info);
 
1344
                } else {
1341
1345
                        info("interrupt (abort already in progress)");
1342
 
                task_state_print(task_state, (log_f) info);
 
1346
                        task_state_print(task_state, (log_f) info);
 
1347
                }
1343
1348
                last_intr = time(NULL);
1344
1349
        } else  { /* second Ctrl-C in half as many seconds */
1345
1350
                update_job_state(job, SRUN_JOB_CANCELLED);