<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<p style="color: #777777;">
<a href="https://gitlab.com/asosedkin">Alexander Sosedkin</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1463#note_663059996">tests/tls13/prf-early.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="286" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
286
</td>
<td class="new_line diff-line-num" data-linenumber="286" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
286
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC286" class="line" lang="c"><span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="287" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
287
</td>
<td class="new_line diff-line-num" data-linenumber="287" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
287
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC287" class="line" lang="c"> <span class="kt" style="color: #458; font-weight: 600;">int</span> <span class="n" style="color: #333;">status</span> <span class="o" style="font-weight: 600;">=</span> <span class="mi" style="color: #099;">0</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="288" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
288
</td>
<td class="new_line diff-line-num" data-linenumber="288" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
288
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC288" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="289" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
289
</td>
<td class="new_line diff-line-num old" data-linenumber="289" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC289" class="line" lang="c"> <span class="n" style="color: #333;"><span class="idiff left deletion">kill</span></span><span class="p">(</span><span class="n" style="color: #333;">child</span><span class="p"><span class="idiff deletion">,</span></span><span class="idiff deletion"> </span><span class="n" style="color: #333;"><span class="idiff deletion">SIGTERM</span></span><span class="p"><span class="idiff right deletion">);</span></span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="290" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
290
</td>
<td class="new_line diff-line-num old" data-linenumber="289" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC290" class="line" lang="c"> <span class="n" style="color: #333;"><span class="idiff left deletion">wait</span></span><span class="p"><span class="idiff deletion">(</span></span><span class="o" style="font-weight: 600;"><span class="idiff deletion">&</span></span><span class="n" style="color: #333;"><span class="idiff right deletion">status</span></span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="291" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
</td>
<td class="new_line diff-line-num new" data-linenumber="289" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
289
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC289" class="line" lang="c"> <span class="k" style="font-weight: 600;"><span class="idiff left addition">if</span></span><span class="idiff addition"> </span><span class="p">(</span><span class="n" style="color: #333;">child</span><span class="p"><span class="idiff addition">)</span></span><span class="idiff addition"> </span><span class="p"><span class="idiff right addition">{</span></span></span>
</pre>
</td>
</tr>
</table>
<div style="">
<p dir="auto">That'd be the case when all terminate-instead-of-exits-in-children scenarios are caught, they aren't. I've tried to catch the most common ones (<code>terminate() directly inside </code>client()<code>when</code>client()` is called in the child process), but in the process of doing that I've also noted at least one case where child is the server and at least one case where they swap roles and both called the same function calling terminate. Thus the generic safeguard.</p>
<p dir="auto">What would be the benefits of having an assert here?</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1463#note_663059996">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/c8f5d55b6c80097ecea3ff20ab1ec1d4/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1463#note_663059996"}}</script>
</p>
</div>
</body>
</html>