File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ enum ConvertOutcome
4444 CONVERT_ERROR
4545};
4646
47+ bool IsExpectedRejectSignal (int signal)
48+ {
49+ return signal == SIGABRT || signal == SIGINT ;
50+ }
51+
4752int CountPartialPhiSpheres (const G4VSolid* solid)
4853{
4954 const G4Sphere* sphere = dynamic_cast <const G4Sphere*>(solid);
@@ -97,8 +102,15 @@ ConvertOutcome ConvertInChildProcess(const G4VSolid* solid)
97102
98103 if (WIFSIGNALED (status))
99104 {
100- std::cout << " child rejected conversion with signal " << WTERMSIG (status) << std::endl;
101- return CONVERT_REJECTED ;
105+ int signal = WTERMSIG (status);
106+ if (IsExpectedRejectSignal (signal))
107+ {
108+ std::cout << " child rejected conversion with expected signal " << signal << std::endl;
109+ return CONVERT_REJECTED ;
110+ }
111+
112+ std::cerr << " child crashed with unexpected signal " << signal << std::endl;
113+ return CONVERT_ERROR ;
102114 }
103115
104116 if (WIFEXITED (status) && WEXITSTATUS (status) == 0 )
You can’t perform that action at this time.
0 commit comments