[gmx-developers] gmx I/O redirection troubles
Schulz, Roland
roland.schulz at intel.com
Tue Jan 3 06:27:00 CET 2017
Hi,
Please upload a patch to Gerrit.gromacs.org.
Roland
From: gromacs.org_gmx-developers-bounces at maillist.sys.kth.se [mailto:gromacs.org_gmx-developers-bounces at maillist.sys.kth.se] On Behalf Of Boris Timofeev
Sent: Monday, January 2, 2017 10:26 AM
To: gromacs.org_gmx-developers at maillist.sys.kth.se
Subject: [gmx-developers] gmx I/O redirection troubles
Now I finish development of Win64 GUI for a call of the Gromacs commands.
It uses well structured help of Gromacs utilities for dynamic creation of modeless dialog boxes
for a choice of parameters of a commands and then commands execution.
It is implemented by non-blocked I/O redirection of gmx I/O through named pipes.
The main problem which I taked - The commands in interactive mode of user interaction hungs up,
so without showing anything in the pipes. After some time of dances with tambourines (debugging),
I understood that faults caused by buffering of stdout/stderr,
the problem was solved by adding of fflush (stdout/stderr) before an interactive call of fgets (., stdin).
In this regard I have any questions to developpers:
- whether it makes a sense to add correction to a repository or it is better to make it to authors of a code?
- why such disorder with use of stdout and stderr in sources?
List of files witsh adding fflush:
gmx_eneconv.cpp
gmx_energy.cpp
gmx_make_ndx.cpp
gmx_trjcat.cpp
pdb2gmx.cpp
pdb2top.cpp
specbond.cpp
ter_db.cpp
index.cpp
And may be anything else?
--
Boris Timofeev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-developers/attachments/20170103/88074225/attachment-0001.html>
More information about the gromacs.org_gmx-developers
mailing list