File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -223,7 +223,11 @@ static void dumpBacktrace( unsigned int depth )
223
223
if ( pipe ( fd ) == 0 && fork () == 0 )
224
224
{
225
225
close ( STDIN_FILENO ); // close stdin
226
- ( void ) dup ( fd[0 ] ); // stdin from pipe
226
+
227
+ // stdin from pipe
228
+ if ( dup ( fd[0 ] ) != STDIN_FILENO )
229
+ QgsDebugMsg ( " dup to stdin failed" );
230
+
227
231
close ( fd[1 ] ); // close writing end
228
232
execl ( " /usr/bin/c++filt" , " c++filt" , ( char * ) 0 );
229
233
perror ( " could not start c++filt" );
@@ -234,7 +238,11 @@ static void dumpBacktrace( unsigned int depth )
234
238
stderr_fd = dup ( STDERR_FILENO );
235
239
close ( fd[0 ] ); // close reading end
236
240
close ( STDERR_FILENO ); // close stderr
237
- ( void ) dup ( fd[1 ] ); // stderr to pipe
241
+
242
+ // stderr to pipe
243
+ if ( dup ( fd[1 ] ) != STDERR_FILENO )
244
+ QgsDebugMsg ( " dup to stderr failed" );
245
+
238
246
close ( fd[1 ] ); // close duped pipe
239
247
}
240
248
@@ -246,7 +254,8 @@ static void dumpBacktrace( unsigned int depth )
246
254
{
247
255
int status;
248
256
close ( STDERR_FILENO );
249
- ( void ) dup ( stderr_fd );
257
+ if ( dup ( stderr_fd ) != STDERR_FILENO )
258
+ QgsDebugMsg ( " dup to stderr failed" );
250
259
close ( stderr_fd );
251
260
wait ( &status );
252
261
}
You can’t perform that action at this time.
0 commit comments