From d33d66f46e055e9ba539de42e26b9b5a46a3fbed Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 20 Feb 2015 12:16:17 -0800 Subject: Adding fflush() to make sure stdout responses appear on time. --- src/base/wlc/wlcStdin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/base/wlc/wlcStdin.c b/src/base/wlc/wlcStdin.c index fa2a3217..353cbb3e 100644 --- a/src/base/wlc/wlcStdin.c +++ b/src/base/wlc/wlcStdin.c @@ -210,6 +210,7 @@ int Wlc_StdinProcessSmt( Abc_Frame_t * pAbc, char * pCmd ) else if ( Abc_FrameReadProbStatus(pAbc) == 0 ) printf( "sat\n" ); else assert( 0 ); + fflush( stdout ); // wait for stdin for give directions while ( (vInput = Wlc_StdinCollectQuery()) != NULL ) { @@ -240,6 +241,7 @@ int Wlc_StdinProcessSmt( Abc_Frame_t * pAbc, char * pCmd ) // report value of this variable Wlc_NtkReport( (Wlc_Ntk_t *)pAbc->pAbcWlc, Abc_FrameReadCex(pAbc), pName, 16 ); Vec_StrFree( vInput ); + fflush( stdout ); } return 1; } -- cgit v1.2.3