Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jan 2005 15:19:17 +0100 (CET)
From:      Andreas Burmester <buster_hh@gmx.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Andreas Burmester <buster_hh@gmx.net>
Subject:   bin/75884: m4(1): syscmd's output is out of sync with stdout
Message-ID:  <200501061419.j06EJHIY008461@lambda>
Resent-Message-ID: <200501061430.j06EUPwb038343@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         75884
>Category:       bin
>Synopsis:       m4(1): syscmd's output is out of sync with stdout
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 06 14:30:25 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Andreas Burmester
>Release:        FreeBSD 4.10-RELEASE i386
>Organization:
n.d. / private
>Environment:
doesn't matter
>Description:
see >How-To-Repeat
>How-To-Repeat:

	% cat bug.m4
	The time now is: syscmd(date +%T)dnl
	That's all folks.
	% m4 bug.m4
	04:57:46
	The time now is: That's all folks.
	% pdm4 bug.m4
	The time now is: 04:57:55
	That's all folks.
	% gm4 bug.m4
	The time now is: 04:58:01
	That's all folks.

>Fix:

	% diff -u eval.c.org eval.c
	--- eval.c.org  Mon Jul 15 04:06:15 2002
	+++ eval.c      Thu Jan  6 08:33:18 2005
	@@ -241,8 +241,10 @@
	        /*
	         * dosys - execute system command
	         */
	-               if (argc > 2) 
	+               if (argc > 2) {
	+                       fflush(stdout);
	                        sysval = system(argv[2]);
	+               }
	                break;
	 
	        case SYSVTYPE:
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501061419.j06EJHIY008461>