[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konsole-devel
Subject:    Re: Review Request 130117: Fix detection of EOF
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2017-05-08 20:02:58
Message-ID: 20170508200258.25551.35744 () mimi ! kde ! org
[Download RAW message or body]

--===============7931389087189267196==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit



> On May 8, 2017, 9:40 a.m., Oswald Buddenhagen wrote:
> > this looks familiar ... https://phabricator.kde.org/D4975
> > 
> > so assuming the condition is valid, this requires an _extensive_ comment.
> > also, shouldn't this just be unified with the solaris code path?
> 
> Martin Tobias Holmedahl Sandsmark wrote:
> No, Solaris has a very different behavior that is described by the already existing comment (needing to \
> "drain" the empty bytes with read(..., 0); etc.). It won't work on Linux. 
> What stuff do you want in the comment? I described how detecting an EOF is supposed to be done (by \
> actually trying to read).

the part i find interesting is the explanation of the confirmed legit situations where this can occur. \
judging by the phab diff, there is a change of behavior in the kernel involved. otoh, the bugzilla entry \
suggests that there is a behavior change in kpty, which doesn't ring a bell in to me. i want that cleared \
up, because it _smells_.


- Oswald


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/130117/#review103203
-----------------------------------------------------------


On May 6, 2017, 8:09 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/130117/
> -----------------------------------------------------------
> 
> (Updated May 6, 2017, 8:09 p.m.)
> 
> 
> Review request for Konsole, Kurt Hindenburg, Oswald Buddenhagen, and Peter Wu.
> 
> 
> Bugs: 372991
> https://bugs.kde.org/show_bug.cgi?id=372991
> 
> 
> Repository: kpty
> 
> 
> Description
> -------
> 
> Don't just assume that 0 bytes read means EOF.
> 
> 
> Diffs
> -----
> 
> src/kptydevice.cpp 22233a5 
> 
> Diff: https://git.reviewboard.kde.org/r/130117/diff/
> 
> 
> Testing
> -------
> 
> Fixes the konsole issue from https://phabricator.kde.org/D4975 and \
> https://bugs.kde.org/show_bug.cgi?id=372991 and the autotest works. 
> 
> Thanks,
> 
> Martin Tobias Holmedahl Sandsmark
> 
> 


--===============7931389087189267196==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 7bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/130117/">https://git.reviewboard.kde.org/r/130117/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 8th, 2017, 9:40 a.m. CEST, <b>Oswald Buddenhagen</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">this looks familiar ... https://phabricator.kde.org/D4975</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">so \
assuming the condition is valid, this requires an <em style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;">extensive</em> comment. also, shouldn't this just be unified \
with the solaris code path?</p></pre>  </blockquote>




 <p>On May 8th, 2017, 1:03 p.m. CEST, <b>Martin Tobias Holmedahl Sandsmark</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">No, Solaris has a very different behavior that is described by the already \
existing comment (needing to "drain" the empty bytes with read(..., 0); etc.). It won't work on \
Linux.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">What stuff do you want in the comment? I described how detecting an EOF is supposed to be done \
(by actually trying to read).</p></pre>  </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">the part i find interesting is the explanation of the confirmed legit \
situations where this can occur. judging by the phab diff, there is a change of behavior in the kernel \
involved. otoh, the bugzilla entry suggests that there is a behavior change in kpty, which doesn't ring a \
bell in to me. i want that cleared up, because it <em style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;">smells</em>.</p></pre> <br />










<p>- Oswald</p>


<br />
<p>On May 6th, 2017, 8:09 p.m. CEST, Martin Tobias Holmedahl Sandsmark wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; \
border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for Konsole, Kurt Hindenburg, Oswald Buddenhagen, and Peter Wu.</div>
<div>By Martin Tobias Holmedahl Sandsmark.</div>


<p style="color: grey;"><i>Updated May 6, 2017, 8:09 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://bugs.kde.org/show_bug.cgi?id=372991">372991</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kpty
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid \
#b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Don't just assume that 0 bytes read means \
EOF.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">Fixes the konsole issue from \
https://phabricator.kde.org/D4975 and https://bugs.kde.org/show_bug.cgi?id=372991 and the autotest \
works.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>src/kptydevice.cpp <span style="color: grey">(22233a5)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/130117/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============7931389087189267196==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic