![]() |
|
|
#1 |
|
Aug 2022
3 Posts |
I just started mprime, I wanted to make it pause during some of the my cron jobs (bash scripts) that cannot be recognized by the name (it's not like you run another intensive program that you can identify by the name).
What did not work: Code:
mprime -m -w/var/lib/gimps killall -s SIGINT mprime # (or SIGTSTP or SIGSTOP) killall -s SIGCONT mprime My solution: Code:
ln -s /usr/bin/sleep /usr/local/bin/PAUSE_MERSENNE Code:
#!/bin/bash /usr/local/bin/PAUSE_MERSENNE 3600 & PID_PAUSE_MERSENNE=$! # script commands # ... kill $PID_PAUSE_MERSENNE Code:
PauseWhileRunning=PAUSE_MERSENNE Code:
[Work thread Sep 3 19:19] Stopping PRP test of Mxxxxxxxxx at iteration 19589852 [17.13%] [Work thread Sep 3 19:19] Pausing because PAUSE_MERSENNE is running. ### later when the script finishes... [Work thread Sep 3 19:19] Resuming processing. |
|
|
|
|
|
#2 |
|
"Alexander"
Nov 2008
The Alamo City
991 Posts |
Thanks for the tip, but I wish we didn't need this sort of kludge. mprime could have actual handlers for SIGSTOP and SIGCONT that would (in interactive mode) invoke the corresponding menu entries and drop back to the menu, or (in non-interactive mode) simply pause and resume execution.
|
|
|
|
![]() |
| Thread Tools | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to pause/resume a process | Prime95 | Linux | 8 | 2018-06-18 18:07 |
| Work Fetch - External Command | 0PolarBearsHere | MISFIT | 31 | 2017-08-30 20:44 |
| Scripts thread | bsquared | YAFU | 4 | 2012-10-21 19:45 |
| Escape sequences in bash scripts? | CRGreathouse | Software | 16 | 2009-03-26 08:42 |
| Need an extra brain? Try an external one! | ewmayer | Lounge | 3 | 2009-02-04 20:51 |