summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBo Lindbergh <blgl@hagernas.com>2006-12-14 14:34:06 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-12-14 12:43:20 +0000
commit52cd570b156cb8d25d4b58a0d3609d882939ce85 (patch)
tree035a6b5f604ccdf2682b8493d465c8f707416b39 /lib
parent3f7ef1d47a39c6edacb8e622913a2981b3310cc5 (diff)
downloadperl-52cd570b156cb8d25d4b58a0d3609d882939ce85.tar.gz
perl5db.pl Mac OS X fix
Message-Id: <658AFA03-517E-4068-93CA-06D4A93B5CA5@hagernas.com> p4raw-id: //depot/perl@29555
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5db.pl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 0effa3b087..4c88e64407 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -6212,6 +6212,11 @@ a new window.
# There's no direct accessor for the tty device name, so we fiddle
# with the window title options until it says what we want.
#
+# Since "do script" is implemented by supplying the argument (plus a
+# return character) as terminal input, there's a potential race condition
+# where the debugger could beat the shell to reading the command.
+# To prevent this, we wait for the screen to clear before proceeding.
+#
# Tested and found to be functional in Mac OS X 10.3.9 and 10.4.8.
sub macosx_get_fork_TTY
@@ -6230,6 +6235,9 @@ tell application "Terminal"
set custom title to ""
copy name to thetitle
set custom title to "forked perl debugger"
+ repeat while (length of first paragraph of (get contents)) > 0
+ delay 0.1
+ end repeat
end tell
end tell
"/dev/" & thetitle