mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-01 22:58:44 -04:00
opt: avoid spawn null cmd
This commit is contained in:
parent
8b752adcd4
commit
56b45dece2
1 changed files with 4 additions and 0 deletions
|
|
@ -6104,6 +6104,10 @@ void setup(void) {
|
|||
}
|
||||
|
||||
void spawn(const Arg *arg) {
|
||||
|
||||
if(!arg->v)
|
||||
return;
|
||||
|
||||
if (fork() == 0) {
|
||||
// 1. 忽略可能导致 coredump 的信号
|
||||
signal(SIGSEGV, SIG_IGN);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue