Change 29555 by [EMAIL PROTECTED] on 2006/12/14 12:43:20
Subject: [PATCH] perl5db.pl Mac OS X fix
From: Bo Lindbergh <[EMAIL PROTECTED]>
Date: Thu, 14 Dec 2006 13:34:06 +0100
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
... //depot/perl/lib/perl5db.pl#124 edit
Differences ...
==== //depot/perl/lib/perl5db.pl#124 (text) ====
Index: perl/lib/perl5db.pl
--- perl/lib/perl5db.pl#123~29415~ 2006-11-29 03:01:06.000000000 -0800
+++ perl/lib/perl5db.pl 2006-12-14 04:43:20.000000000 -0800
@@ -6212,6 +6212,11 @@
# 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 @@
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
End of Patch.