|
From: <jh...@us...> - 2012-03-18 15:28:50
|
Revision: 307
http://etch.svn.sourceforge.net/etch/?rev=307&view=rev
Author: jheiss
Date: 2012-03-18 15:28:44 +0000 (Sun, 18 Mar 2012)
Log Message:
-----------
ticket:14
Increase output capture timeout in interactive mode.
>From the ticket:
The output capture timeout causes the interactive mode prompt to timeout
and fail after a few minutes. I often need to leave an interactive
prompt for a few minutes while I research something.
Modified Paths:
--------------
trunk/client/lib/etch/client.rb
Modified: trunk/client/lib/etch/client.rb
===================================================================
--- trunk/client/lib/etch/client.rb 2012-03-03 16:21:43 UTC (rev 306)
+++ trunk/client/lib/etch/client.rb 2012-03-18 15:28:44 UTC (rev 307)
@@ -2452,6 +2452,8 @@
# for etch to handle any given file, including running any
# setup/pre/post commands.
OUTPUT_CAPTURE_TIMEOUT = 5 * 60
+ # In interactive mode bump the timeout up to something absurdly large
+ OUTPUT_CAPTURE_INTERACTIVE_TIMEOUT = 14 * 24 * 60 * 60
def start_output_capture
# Establish a pipe, spawn a child process, and redirect stdout/stderr
# to the pipe. The child gathers up anything sent over the pipe and
@@ -2503,7 +2505,13 @@
# capturing feature this results in etch hanging around forever
# waiting for the pipes to close. We time out after a suitable
# period of time so that etch processes don't hang around forever.
- Timeout.timeout(OUTPUT_CAPTURE_TIMEOUT) do
+ timeout = nil
+ if @interactive
+ timeout = OUTPUT_CAPTURE_INTERACTIVE_TIMEOUT
+ else
+ timeout = OUTPUT_CAPTURE_TIMEOUT
+ end
+ Timeout.timeout(timeout) do
while char = pread.getc
putc(char)
output << char.chr
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|