<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=utf-8">
<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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.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;}
--></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">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Please upload a patch to Gerrit.gromacs.org.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D">Roland<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif;color:#1F497D"><o:p>&nbsp;</o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,sans-serif"> gromacs.org_gmx-developers-bounces@maillist.sys.kth.se
 [mailto:gromacs.org_gmx-developers-bounces@maillist.sys.kth.se] <b>On Behalf Of </b>
Boris Timofeev<br>
<b>Sent:</b> Monday, January 2, 2017 10:26 AM<br>
<b>To:</b> gromacs.org_gmx-developers@maillist.sys.kth.se<br>
<b>Subject:</b> [gmx-developers] gmx I/O redirection troubles<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p>Now I finish development of Win64 GUI for a call of the Gromacs commands. <br>
It uses well structured help of Gromacs utilities for dynamic creation of modeless dialog boxes
<br>
for a choice of parameters of a commands and then commands execution. <br>
It is implemented by non-blocked I/O redirection of gmx I/O through named pipes.<o:p></o:p></p>
<p>The main problem which I taked - The commands in interactive mode of user interaction hungs up,
<br>
so without showing anything in the pipes. After some time of dances with tambourines (debugging),<br>
I understood that faults caused by buffering of stdout/stderr, <br>
the problem was solved by adding of fflush (stdout/stderr) before an interactive call of fgets (., stdin).<br>
In this regard I have any questions to developpers: <br>
- whether it makes a sense to add correction to a repository or it is better to make it to authors of a code?<br>
- why such disorder with use of stdout and stderr in sources?<br>
List of files witsh adding fflush:<o:p></o:p></p>
<p>gmx_eneconv.cpp<br>
gmx_energy.cpp<br>
gmx_make_ndx.cpp<br>
gmx_trjcat.cpp<br>
pdb2gmx.cpp<br>
pdb2top.cpp<br>
specbond.cpp<br>
ter_db.cpp<br>
index.cpp<o:p></o:p></p>
<p>And may be anything else?<o:p></o:p></p>
<p class="MsoNormal"><br>
<br>
<br>
-- <br>
Boris Timofeev<o:p></o:p></p>
</div>
</body>
</html>