comparison mplayer.c @ 24981:cacb3695a1a4

Restore terminal for gdb with -crash-debug by calling getch2_disable()
author reimar
date Sat, 10 Nov 2007 11:09:08 +0000
parents 7667b611e6b4
children 5d338b18763d
comparison
equal deleted inserted replaced
24980:19e208a0296d 24981:cacb3695a1a4
772 spid[19] = 0; 772 spid[19] = 0;
773 mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forking...\n"); 773 mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forking...\n");
774 gdb_pid = fork(); 774 gdb_pid = fork();
775 mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n"); 775 mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n");
776 if (gdb_pid == 0) { // We are the child 776 if (gdb_pid == 0) { // We are the child
777 getch2_disable(); // allow terminal to work properly with gdb
777 if (execlp("gdb", "gdb", prog_path, spid, NULL) == -1) 778 if (execlp("gdb", "gdb", prog_path, spid, NULL) == -1)
778 mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n"); 779 mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n");
779 } else if (gdb_pid < 0) 780 } else if (gdb_pid < 0)
780 mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n"); 781 mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't fork\n");
781 else { 782 else {