From owner-freebsd-bugs Thu Sep 11 17:00:08 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA09926 for bugs-outgoing; Thu, 11 Sep 1997 17:00:08 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA09897; Thu, 11 Sep 1997 17:00:02 -0700 (PDT) Resent-Date: Thu, 11 Sep 1997 17:00:02 -0700 (PDT) Resent-Message-Id: <199709120000.RAA09897@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, nsayer@quack.kfu.com Received: from relay1.UU.NET (relay1.UU.NET [192.48.96.5]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id QAA08949 for ; Thu, 11 Sep 1997 16:50:12 -0700 (PDT) Received: from slxinc.specialix.com by relay1.UU.NET with SMTP (peer crosschecked as: slxinc.specialix.com [192.65.145.1]) id QQdgpj11058; Thu, 11 Sep 1997 19:47:53 -0400 (EDT) Received: from zephyr.specialix.com by specialix.com id aa10176; 11 Sep 97 16:48 PDT Received: by zephyr.specialix.com (8.8.5//ident-1.0) id QAA01738; Thu, 11 Sep 1997 16:47:32 -0700 (PDT) Message-Id: <199709112347.QAA01738@zephyr.specialix.com> Date: Thu, 11 Sep 1997 16:47:32 -0700 (PDT) From: nsayer@quack.kfu.com Reply-To: nsayer@quack.kfu.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/4514: stdio does not flush on fork() Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4514 >Category: bin >Synopsis: stdio does not flush on fork() >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Sep 11 17:00:01 PDT 1997 >Last-Modified: >Originator: Nick Sayer >Organization: Just me >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: >Description: If the stdio buffers are not flushed, a fork() will replicate the filled buffer to the child, resulting in doubling the data. It is inconsistent, however you slice it, to have one printf call result in multiple outputs. >How-To-Repeat: #include main() { printf("this will appear twice."); fork(); } >Fix: >Audit-Trail: >Unformatted: