Skip to content
Permalink
Browse files

8241695: JFR TestCrossProcessStreaming.java child process exited with…

… SIGQUIT (131)

Waiting for child's main() to start before attaching

Reviewed-by: egahlin
  • Loading branch information
Mikhailo Seledtsov committed Apr 7, 2020
1 parent 6351f95 commit 1a40b7931a0fcc7a21d215481a90a99fb8c8d127
Showing with 6 additions and 1 deletion.
  1. +6 −1 test/jdk/jdk/jfr/api/consumer/streaming/TestCrossProcessStreaming.java
@@ -127,13 +127,18 @@ public static void main(String... args) throws Exception {
}

static class EventProducer {
private static final String MAIN_STARTED = "MAIN_STARTED";

static Process start() throws Exception {
String[] args = {"-XX:StartFlightRecording", EventProducer.class.getName()};
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(false, args);
return ProcessTools.startProcess("Event-Producer", pb);
return ProcessTools.startProcess("Event-Producer", pb,
line -> line.contains(MAIN_STARTED),
0, TimeUnit.SECONDS);
}

public static void main(String... args) throws Exception {
System.out.println(MAIN_STARTED);
ResultEvent rs = new ResultEvent();
rs.batch1Count = emit(TestEvent1.class, "second-batch");
rs.batch2Count = emit(TestEvent2.class, "exit");

0 comments on commit 1a40b79

Please sign in to comment.