mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-03 09:01:47 -05: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) {
|
void spawn(const Arg *arg) {
|
||||||
|
|
||||||
|
if(!arg->v)
|
||||||
|
return;
|
||||||
|
|
||||||
if (fork() == 0) {
|
if (fork() == 0) {
|
||||||
// 1. 忽略可能导致 coredump 的信号
|
// 1. 忽略可能导致 coredump 的信号
|
||||||
signal(SIGSEGV, SIG_IGN);
|
signal(SIGSEGV, SIG_IGN);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue