<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Calibri Light";
        panose-1:2 15 3 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:211120494;
        mso-list-template-ids:-1196134016;}
@list l1
        {mso-list-id:597711732;
        mso-list-template-ids:-1796195930;}
@list l1:level1
        {mso-level-start-at:2;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2
        {mso-list-id:1257902417;
        mso-list-type:hybrid;
        mso-list-template-ids:-449779394 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l2:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt">Kindly explain the expected behavior from an engine when the application forks.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">In case of an engine that uses system-wide resources and cannot work properly when duplicated (forked), is it possible to enforce/hint the application in any way to follow init-after-fork? Is there any guidelines
 for applications to perform fork and engine init in certain order?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt">Difference in behavior of OpenSSL speed -multi application:<o:p></o:p></span></b></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l2 level1 lfo3"><span style="font-size:12.0pt">When using command line option to set engine, the speed application explicitly delays engine init until fork happens. The speed application doesn’t call
 Engine_init() while parsing command line arguments. Below comment can be seen in code,<o:p></o:p></span></li></ol>
<p class="MsoNormal" style="margin-left:1.0in"><i><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif">  /*<o:p></o:p></span></i></p>
<p class="MsoNormal" style="margin-left:1.0in"><i><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif">     * In a forked execution, an engine might need to be<o:p></o:p></span></i></p>
<p class="MsoNormal" style="margin-left:1.0in"><i><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif">     * initialised by each child process, not by the parent.<o:p></o:p></span></i></p>
<p class="MsoNormal" style="margin-left:1.0in"><i><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif">     * So store the name here and run setup_engine() later on.<o:p></o:p></span></i></p>
<p class="MsoNormal" style="margin-left:1.0in"><i><span style="font-size:12.0pt;font-family:"Calibri Light",sans-serif">     */<o:p></o:p></span></i></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt">From this, can it be inferred that OpenSSL doesn’t expect an engine to work across forks?<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<ol style="margin-top:0in" start="2" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l2 level1 lfo3"><span style="font-size:12.0pt">When using conf file to load engine, unlike above scenario, the engine is initialized in parent process while parsing conf file itself. OpenSSL doesn’t
 seem to give the application control over initialization of engine specified in conf file. Thus, while using speed -multi with conf file, the engine is not initialized in the child processes but only in parent.<o:p></o:p></span></li></ol>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Considering an engine that cannot work across forks, what should be the way to go?<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">Ramkumar Balu<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>