Hi all, in some cases for system maintenance (e.g. shortly before putting the system on standby or sleep) it could be wise to stop all running processes (and let them continue after doing some operation). So how to achieve this in shell scripts ...
There is a nice command to send signals to all processes except the own session, init and it even allows to exclude specified processes ... the killall5 ... but it fails to work on SIGSTOP :-( I looked into the code and found that it does: - send SIGSTOP to all processes - send the requested signal to all expected processes - send SIGCONT to all processes So this fails if you specify the signals SIGSTOP or SIGCONT ! My request: Is it wise to modify killall5 to send SIGSTOP/SIGCONT to all processes only if the specified signal is neither SIGSTOP nor SIGCONT ? This would allow killall5 to be used to easily stop all processes before system maintenance operation and to continue afterwards. To state it clear: I do not want to use the Stop/Continue to be used for every kind of synchronization. It is just for the rare cases of system shutdown or suspension, or for other emergency situations. As this killall5 seems to be the right place for this usage, it is normally considered to be placed only in init scripts. Any comments on this? -- Harald _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
