Timeline for Is there any other way to pause current running process and run it in background other than Ctrl+Z followed by bg?
Current License: CC BY-SA 4.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 16, 2022 at 15:22 | comment | added | aviro |
@MC68020, SIGSTOP (as opposed to SIGTSTP) cannot be blocked, ignored or handled. When running CTRL+Z, it actually sends SIGSTP to the process. So if you really want to simulate CTRL+Z, you should use kill -TSTP. It should also be added to the answer, since usually it is better to use SIGTSTP to allow the application to handle it gracefully using a signal handler. SIGSTOP should be use If SIGTSTP fails (due to the signal being blocked/ignored).
|
|
| Feb 16, 2022 at 14:41 | comment | added | MC68020 | This will work at the condition the process killed handles SIGSTOP/SIGCONT in some other way than SIG_IGN. Applied to mongodb processes, OP should check, I remember that (long time ago) mongodb had no proper support for these signals. Sure things might have changed so check first. Anyhow whenever killing whatever, always first check that the signal is handled according to what you expect. | |
| Feb 16, 2022 at 14:12 | review | Low quality posts | |||
| Feb 16, 2022 at 14:42 | |||||
| S Feb 16, 2022 at 13:50 | review | First answers | |||
| Feb 16, 2022 at 14:22 | |||||
| S Feb 16, 2022 at 13:50 | history | answered | Magnus | CC BY-SA 4.0 |