Bug 168361 - Handle EINTR during webkitpy server process select()
Summary: Handle EINTR during webkitpy server process select()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-15 02:32 PST by Florian Bruhin
Modified: 2017-02-20 04:25 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2017-02-15 02:35 PST, Florian Bruhin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Bruhin 2017-02-15 02:32:25 PST
Otherwise, on my machine, resizing the terminal run-webkit-tests is running in makes it die.
Comment 1 Florian Bruhin 2017-02-15 02:35:08 PST
Created attachment 301600 [details]
Patch
Comment 2 Adrian Perez 2017-02-16 03:00:43 PST
Comment on attachment 301600 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301600&action=review

(Note: This is an informal review)

Just a small nit, otherwise it looks fine.

> Tools/Scripts/webkitpy/port/server_process.py:250
> +            if e.args[0] in [errno.EINVAL, errno.EINTR]:

I would use a tuple here, i.e:

   if e.args[0] in (errno.EINVAL, errno.EINTR):
Comment 3 Florian Bruhin 2017-02-16 04:46:57 PST
>> Tools/Scripts/webkitpy/port/server_process.py:250
>> +            if e.args[0] in [errno.EINVAL, errno.EINTR]:
>
> I would use a tuple here, i.e:
>
>   if e.args[0] in (errno.EINVAL, errno.EINTR):

I'm curious - why? I view a tuple mostly as structured heterogeneous collections of data where the order/length matter (e.g., a (name, age) tuple), and a list as a collection of heterogeneous collection (i.e. a list of error numbers, like here).

If this is about tuples being immutable, that doesn't really matter much IMHO when used as literals like here.

FWIW I'm happy to change it, but I'd like to understand why :-)
Comment 4 Michael Catanzaro 2017-02-16 09:30:48 PST
Comment on attachment 301600 [details]
Patch

[(I don't care if it's a tuple or a list. Ping again to ask for cq+ after sorting it out.)]
Comment 5 WebKit Commit Bot 2017-02-20 04:24:57 PST
Comment on attachment 301600 [details]
Patch

Clearing flags on attachment: 301600

Committed r212631: <http://trac.webkit.org/changeset/212631>
Comment 6 WebKit Commit Bot 2017-02-20 04:25:01 PST
All reviewed patches have been landed.  Closing bug.