diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-08 22:18:48 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2008-01-08 22:18:48 +0000 |
commit | 50e083bdb9a89d4b08bb3cfed8417af222a27855 (patch) | |
tree | b02c4834361cddbb27362db5ffd0452345975084 | |
parent | afb944d4c0f032fc9a653eb5bf96d2f6540bf8fe (diff) | |
download | mpv-50e083bdb9a89d4b08bb3cfed8417af222a27855.tar.bz2 mpv-50e083bdb9a89d4b08bb3cfed8417af222a27855.tar.xz |
Use getppid instead of getpid and move a snprintf to where it is actually needed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25653 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | mplayer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -780,12 +780,12 @@ static void exit_sighandler(int x){ #ifdef CRASH_DEBUG if (crash_debug) { int gdb_pid; - char spid[20]; - snprintf(spid, sizeof(spid), "%i", getpid()); mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forking...\n"); gdb_pid = fork(); mp_msg(MSGT_CPLAYER, MSGL_INFO, "Forked...\n"); if (gdb_pid == 0) { // We are the child + char spid[20]; + snprintf(spid, sizeof(spid), "%i", getppid()); getch2_disable(); // allow terminal to work properly with gdb if (execlp("gdb", "gdb", prog_path, spid, "-ex", "bt", NULL) == -1) mp_msg(MSGT_CPLAYER, MSGL_ERR, "Couldn't start gdb\n"); |