From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9297 Path: news.gmane.org!not-for-mail From: Max Ruttenberg Newsgroups: gmane.linux.lib.musl.general Subject: Enforcing expected ordering of operations on stdout, stdin, and stderr Date: Wed, 10 Feb 2016 16:49:09 -0500 Message-ID: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e0160c35c6850da052b716736 X-Trace: ger.gmane.org 1455140972 21161 80.91.229.3 (10 Feb 2016 21:49:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 10 Feb 2016 21:49:32 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9310-gllmg-musl=m.gmane.org@lists.openwall.com Wed Feb 10 22:49:31 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aTcde-0002ra-7T for gllmg-musl@m.gmane.org; Wed, 10 Feb 2016 22:49:30 +0100 Original-Received: (qmail 26604 invoked by uid 550); 10 Feb 2016 21:49:26 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 26549 invoked from network); 10 Feb 2016 21:49:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emutechnology-com.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to:content-type; bh=MwaaWk1tHXvJwoufB32Cqr94vgTsEx/+IpeAJdH3dH0=; b=XGWhWCazLtR0ASKheVIJX+g6NIV//+WDAFJXIIV7nIdAEIlgT8AUZ39kbSNFcmzUJq N7kXoa6Fb6a5hprU1M202yko2NnrNR3KZ7QphdIvxycs9Ilnvptm9qz/75lHiNr8Qx8X rYWJg5l5iNTTkWMzKR+oLKm7I2V5lT9/Eh5chg3puVgTGypaYqtrkJNLy/IREmuDbK/H 9C4xQF/dI0lQ3W+fX/Krisl7IzSQARZOZUzFBkAtnUyQKecaJSm+axfWtbcF8jdxO8eW hC40X/tWAjEdglAuTrojSxZEYb7dG/CqQIriIvmZLhLFQWN035SIDgkX4GGoOovRkejy B1Yw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=MwaaWk1tHXvJwoufB32Cqr94vgTsEx/+IpeAJdH3dH0=; b=WT9IhnX/c9CUFBFDhgsUo4okWqp009/p0PBnBH/5Q7nEyClNk+x4OYBodnBJWwiceI o8H5MKnWlST8/q5D4Mgm3X9zkowdmHNtTrHzL9G70Ewy4On8S7hP1COXtxtAwqvlheH0 mXvrji+oPRENbrx1kBvErQm623dDA0CsRjmvWqeFtuZre7PJZwj3vM/KJ55jeykv6nq9 tkYfe67AeFGQ7O1uF2cloy8IKfS5iEZkeqKxPBn97oGT2U/k02RuEqDcB8Vz/ymZ1zD/ TkLVendFrCajKF/MOs9JLqPURHGo81Fl3XIZcULOmQNeGfaeUoTnpSvobsHeCWtlkTaD //mw== X-Gm-Message-State: AG10YOTOZfVaqv+n+RSMYMTnpxFpllU7zS8jfrN910nwiWEK7qhxuSX8/XVxGpkn/oEul2GF5xhY6gGDQyZy0A== X-Received: by 10.182.250.169 with SMTP id zd9mr4380431obc.59.1455140949734; Wed, 10 Feb 2016 13:49:09 -0800 (PST) Xref: news.gmane.org gmane.linux.lib.musl.general:9297 Archived-At: --089e0160c35c6850da052b716736 Content-Type: text/plain; charset=UTF-8 All, I guess my question is more easily asked through an example. If I have code that makes a call to puts and then a call to getchar, what mechanism enforces that stdout gets flushed before blocking for stdin? Is there a such a mechanism? My gut says yes but I haven't been able to pinpoint it. Thanks, Max --089e0160c35c6850da052b716736 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
All,

I guess my question is more = easily asked through an example. If I have code that makes a call to puts a= nd then a call to getchar, what mechanism enforces that stdout gets flushed= before blocking for stdin? Is there a such a mechanism? My gut says yes bu= t I haven't been able to pinpoint it.=C2=A0

Tha= nks,
Max
--089e0160c35c6850da052b716736--