summaryrefslogtreecommitdiff
path: root/src/libs/utils/consoleprocess_unix.cpp
diff options
context:
space:
mode:
authorOrgad Shaneh <orgad.shaneh@audiocodes.com>2014-05-14 11:26:20 +0300
committerOrgad Shaneh <orgads@gmail.com>2014-05-15 15:07:53 +0200
commita075bad97f281a47d341498e730057e868621d81 (patch)
tree7c5e07210215fad779b6d2121ea7aa1ee16a2cf6 /src/libs/utils/consoleprocess_unix.cpp
parent4f62d6517474aa8c9ccdc8737e1ab46c9ad0aa69 (diff)
downloadqt-creator-a075bad97f281a47d341498e730057e868621d81.tar.gz
Fix debugging of terminal applications on Linux
On modern linux distributions (Ubuntu >= 10.10, Debian >= Wheezy), trying to debug a terminal application fails, with "ptrace: Operation not permitted". In order to allow the debugger to attach to the created process, the process itself needs to inform the kernel of the debugging process. Task-number: QTCREATORBUG-3509 Change-Id: I68670426fad18cbe3b7cce9d57633e58e631e025 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/libs/utils/consoleprocess_unix.cpp')
-rw-r--r--src/libs/utils/consoleprocess_unix.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libs/utils/consoleprocess_unix.cpp b/src/libs/utils/consoleprocess_unix.cpp
index 1374d06f16..68917967dc 100644
--- a/src/libs/utils/consoleprocess_unix.cpp
+++ b/src/libs/utils/consoleprocess_unix.cpp
@@ -162,6 +162,7 @@ bool ConsoleProcess::start(const QString &program, const QString &args)
<< msgPromptToClose()
<< workingDirectory()
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
+ << QString::number(getpid())
<< pcmd << pargs.toUnixArgs();
QString xterm = allArgs.takeFirst();