<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - run-webkit-tests should trigger a spindump when WebContent process is unresponsive"
href="https://bugs.webkit.org/show_bug.cgi?id=159827#c27">Comment # 27</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - run-webkit-tests should trigger a spindump when WebContent process is unresponsive"
href="https://bugs.webkit.org/show_bug.cgi?id=159827">bug 159827</a>
from <span class="vcard"><a class="email" href="mailto:dbates@webkit.org" title="Daniel Bates <dbates@webkit.org>"> <span class="fn">Daniel Bates</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=159827#c26">comment #26</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=284354&action=diff" name="attach_284354" title="Patch">attachment 284354</a> <a href="attachment.cgi?id=284354&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=284354&action=review">https://bugs.webkit.org/attachment.cgi?id=284354&action=review</a>
>
> >> Tools/WebKitTestRunner/TestInvocation.cpp:203
> >> + return;
> >
> > OK. Is it necessary to know whether we are running in server mode to know if we should prompt for input for sample completion before terminating the WebContent process? I suspect that waiting for a sample to be taken of an unresponsive WebContent process is mostly of interest to scripts such as run-webkit-tests (for the purpose of implementing it sample on timeout feature). Would it be sufficient to only prompt to sample the WebContent process if standard error is not attached to a tty (e.g. isatty(fileno(stderr)) returns 0)?
>
> Since it is legal to have a script driving the testing process and not be in
> server mode (even if this may not be a current use case) I figure that it is
> safer to check for server mode. We will never waiting for standard in if we
> aren't in server mode, so while it may not be needed for current use cases,
> it seems prudent so that this code doesn't cause hangs later on.
> </span >
OK.
<span class="quote">> >> Tools/WebKitTestRunner/TestInvocation.cpp:206
> >> + if (isatty(fileno(stdin)))
> >
> > This does not seem correct. We should be checking whether standard error is a tty device as opposed to standard input because scripts that tend to capture standard output and standard error of a subprocess (like run-webkit-tests) tend to forward standard input to the subprocess.
>
> Well, it is possible for a user to pipe standard error to a file, correct?</span >
You're right!
<span class="quote">> It seems to me that in this circumstance, where the user pipes standard
> error into a file by standard in is a terminal, we should still prompt the
> user, as the application will hang, but at least standard error will have a
> line describing why.
> </span >
OK.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>