@@ -57,29 +57,34 @@ void do_signal_safe_trace()
57
57
{
58
58
cpptrace::frame_ptr buffer[100 ];
59
59
std::size_t count = cpptrace::safe_generate_raw_trace (buffer, 100 );
60
+
60
61
pipe_t input_pipe;
61
- pipe (input_pipe.data );
62
+ std::ignore = pipe (input_pipe.data );
63
+
62
64
const pid_t pid = fork ();
63
65
if (pid == -1 )
64
66
{
65
- write (STDERR_FILENO, fork_failure_message.data (), fork_failure_message.size ());
67
+ std::ignore = write (STDERR_FILENO, fork_failure_message.data (), fork_failure_message.size ());
66
68
return ;
67
69
}
70
+
68
71
if (pid == 0 )
69
72
{ // child
70
73
dup2 (input_pipe.read_end , STDIN_FILENO);
71
74
close (input_pipe.read_end );
72
75
close (input_pipe.write_end );
73
76
execl (tracer_program.c_str (), tracer_program.c_str (), nullptr );
74
- write (STDERR_FILENO, exec_failure_message.data (), exec_failure_message.size ());
77
+ std::ignore = write (STDERR_FILENO, exec_failure_message.data (), exec_failure_message.size ());
75
78
_exit (1 );
76
79
}
80
+
77
81
for (std::size_t i = 0 ; i < count; i++)
78
82
{
79
83
cpptrace::safe_object_frame frame;
80
84
cpptrace::get_safe_object_frame (buffer[i], &frame);
81
- write (input_pipe.write_end , &frame, sizeof (frame));
85
+ std::ignore = write (input_pipe.write_end , &frame, sizeof (frame));
82
86
}
87
+
83
88
close (input_pipe.read_end );
84
89
close (input_pipe.write_end );
85
90
waitpid (pid, nullptr , 0 );
0 commit comments