1.1 --- a/fsaccess/op_run.c Tue Mar 05 00:16:01 2024 +0100
1.2 +++ b/fsaccess/op_run.c Tue Mar 05 00:18:00 2024 +0100
1.3 @@ -106,7 +106,12 @@
1.4
1.5 static void _show_status(notifiable_t *notifiable)
1.6 {
1.7 - printf("Completed with");
1.8 + int job_number = _find_program((process_t *) notifiable->base);
1.9 +
1.10 + if (job_number == -1)
1.11 + return;
1.12 +
1.13 + printf("[%d] Completed with", job_number);
1.14
1.15 if (notifiable->notifications & NOTIFY_TASK_ERROR)
1.16 printf(" error");
1.17 @@ -183,13 +188,10 @@
1.18 return. Otherwise, just remove it from the job list and keep waiting
1.19 for the indicated process. */
1.20
1.21 + _remove_program(_find_program((process_t *) notifiable->base));
1.22 +
1.23 if ((process_t *) notifiable->base == process)
1.24 - {
1.25 - _remove_program(next_job);
1.26 break;
1.27 - }
1.28 - else
1.29 - _remove_program(_find_program((process_t *) notifiable->base));
1.30 }
1.31 }
1.32
1.33 @@ -383,7 +385,7 @@
1.34 {
1.35 int job_number;
1.36
1.37 - if (argc < 1)
1.38 + if ((argc < 1) || !strcmp(argv[0], "+"))
1.39 job_number = next_job;
1.40 else
1.41 job_number = atoi(argv[0]);