Archived
opt: avoid spawn null cmd
This commit is contained in:
1 parent
8b752adcd4
commit
56b45dece2
1 file changed
+4
@@ -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