From 5397d09e585a1938fb64bc9c5cd5daed1959eb90 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Wed, 4 May 2011 16:41:45 +0900 Subject: Adding upstream version 0.5.3 --- image.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'image.c') diff --git a/image.c b/image.c index f799b14..5f5991a 100644 --- a/image.c +++ b/image.c @@ -1,4 +1,4 @@ -/* $Id: image.c,v 1.36 2003/07/07 15:49:03 ukai Exp $ */ +/* $Id: image.c,v 1.37 2010/12/21 10:13:55 htrb Exp $ */ #include "fm.h" #include @@ -115,10 +115,13 @@ openImgdisplay() static void closeImgdisplay() { - if (Imgdisplay_rf) - fclose(Imgdisplay_rf); if (Imgdisplay_wf) fclose(Imgdisplay_wf); + if (Imgdisplay_rf) { + /* sync with the child */ + getc(Imgdisplay_rf); /* EOF expected */ + fclose(Imgdisplay_rf); + } if (Imgdisplay_pid) kill(Imgdisplay_pid, SIGKILL); Imgdisplay_rf = NULL; -- cgit v1.2.3