opt: avoid spawn null cmd
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user