X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/28628af902f72f15bd3fb0b7c93d1dd8a63d29ac..b1f526e4157e5a965b4773291c81fc71de27de25:/src/mc/mc_liveness.c diff --git a/src/mc/mc_liveness.c b/src/mc/mc_liveness.c index fbbd221e90..82481dcde1 100644 --- a/src/mc/mc_liveness.c +++ b/src/mc/mc_liveness.c @@ -48,7 +48,7 @@ int create_dump(int pair) switch(fork()){ case 0: // We are the child process -- run the actual program - *(int *)1 = 2; // segfault + abort(); break; case -1: @@ -64,8 +64,8 @@ int create_dump(int pair) if(WIFSIGNALED(status) && WCOREDUMP(status)){ printf("got a core dump\n"); char *core_name = malloc(20); - sprintf(core_name,"mv core core_%d", pair); - system((char *)core_name); + sprintf(core_name,"core_%d", pair); + rename("core", core_name); free(core_name); } }