summaryrefslogtreecommitdiff
path: root/app-forensics/yara/files/yara-4.2-test.patch
blob: 43a97030a4fd3fac1240eb040b34b5c41eeb5d37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
https://bugs.gentoo.org/836790
https://github.com/VirusTotal/yara/pull/1683
--- a/tests/test-rules.c
+++ b/tests/test-rules.c
@@ -3061,7 +3061,7 @@ void test_process_scan()
     exit(EXIT_FAILURE);
   }
 
-  spawn("/bin/sh", "-c", "VAR='Hello, world!'; sleep 600; true");
+  spawn("/bin/sh", "-c", "VAR='Hello, world!'; sleep 600& PID=\$!; trap \"kill \$PID\" EXIT; wait; true");
 
   counters.rules_matching = 0;
   counters.rules_not_matching = 0;