crash_stack_command1 = malloc(1000); crash_stack_command2 = malloc(1000); crash_debug_command = malloc(1000);
crash_stack_command1 = (char *) malloc(1000); crash_stack_command2 = (char *) malloc(1000); crash_debug_command =  (char *) malloc(1000);
void initialize_crash_handler(void) {	int pid = program_pid;	crash_stack_command1 = malloc(1000);	crash_stack_command2 = malloc(1000);	crash_debug_command = malloc(1000);	snprintf(crash_stack_command1, 500, "echo where > /tmp/gdb.%d;"	    " env PATH=$PATH:/usr/local/bin:/usr/sfw/bin:/usr/bin"	    " gdb -x /tmp/gdb.%d -batch -n %s %d;"	    " rm -f /tmp/gdb.%d", pid, pid, program_name, pid, pid);	snprintf(crash_stack_command2, 500, "pstack %d", program_pid);		snprintf(crash_debug_command, 500, "gdb %s %d", program_name, pid);}