⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 267538 in webkit


Ignore:
Timestamp:
Sep 24, 2020, 11:23:57 AM (6 years ago)
Author:
basuke.suzuki@sony.com
Message:

[PlayStation] Stop raising SIGPIPE when client side of RemoteInspector dies
https://bugs.webkit.org/show_bug.cgi?id=216805

Reviewed by Don Olmstead.

When communication is stopped caused by peer crash or non-polite close, SIGPIPE will be
raised on BSD (and maybe on Linux). We prefer to handle those events by returning error.

On Windows, there's no such fancy feature from the beginning.

  • inspector/remote/socket/posix/RemoteInspectorSocketPOSIX.cpp:

(Inspector::Socket::read):
(Inspector::Socket::write):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r267535 r267538  
     12020-09-24  Basuke Suzuki  <basuke.suzuki@sony.com>
     2
     3        [PlayStation] Stop raising SIGPIPE when client side of RemoteInspector dies
     4        https://bugs.webkit.org/show_bug.cgi?id=216805
     5
     6        Reviewed by Don Olmstead.
     7
     8        When communication is stopped caused by peer crash or non-polite close, SIGPIPE will be
     9        raised on BSD (and maybe on Linux). We prefer to handle those events by returning error.
     10
     11        On Windows, there's no such fancy feature from the beginning.
     12
     13        * inspector/remote/socket/posix/RemoteInspectorSocketPOSIX.cpp:
     14        (Inspector::Socket::read):
     15        (Inspector::Socket::write):
     16
    1172020-09-24  Angelos Oikonomopoulos  <angelos@igalia.com>
    218
  • trunk/Source/JavaScriptCore/inspector/remote/socket/posix/RemoteInspectorSocketPOSIX.cpp

    r262166 r267538  
    207207    ASSERT(isValid(socket));
    208208
    209     ssize_t readSize = ::read(socket, buffer, bufferSize);
     209    ssize_t readSize = ::recv(socket, buffer, bufferSize, MSG_NOSIGNAL);
    210210    if (readSize >= 0)
    211211        return static_cast<size_t>(readSize);
     
    219219    ASSERT(isValid(socket));
    220220
    221     ssize_t writeSize = ::write(socket, data, size);
     221    ssize_t writeSize = ::send(socket, data, size, MSG_NOSIGNAL);
    222222    if (writeSize >= 0)
    223223        return static_cast<size_t>(writeSize);
Note: See TracChangeset for help on using the changeset viewer.