From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Hi-Angel Newsgroups: gmane.emacs.help Subject: =?UTF-8?Q?Re=3A_On_Windows=28R=29_Emacs_=C2=ABshell=C2=BB_mode_doesn=27t_print?= =?UTF-8?Q?s_an_output=2E?= Date: Thu, 25 Sep 2014 12:44:59 +0400 Message-ID: References: <83a95ow3fm.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1411634733 24837 80.91.229.3 (25 Sep 2014 08:45:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Sep 2014 08:45:33 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 25 10:45:27 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XX4g0-0001ri-8I for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Sep 2014 10:45:24 +0200 Original-Received: from localhost ([::1]:38911 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX4fz-0001Mc-JT for geh-help-gnu-emacs@m.gmane.org; Thu, 25 Sep 2014 04:45:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX4fj-0001KR-UW for help-gnu-emacs@gnu.org; Thu, 25 Sep 2014 04:45:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX4fi-0004qU-C8 for help-gnu-emacs@gnu.org; Thu, 25 Sep 2014 04:45:07 -0400 Original-Received: from mail-ob0-x22e.google.com ([2607:f8b0:4003:c01::22e]:38611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX4fi-0004fv-7P for help-gnu-emacs@gnu.org; Thu, 25 Sep 2014 04:45:06 -0400 Original-Received: by mail-ob0-f174.google.com with SMTP id m8so7752919obr.5 for ; Thu, 25 Sep 2014 01:45:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=R0yO3R6PIufpc44iAqMj1YklBD58E8wVgCvFZW128Po=; b=b0GY/HtzGM+/elMZ4YnG6shWohZHrYxd4HO2vmccjWWtCJKrdzP2jrKxAtd4grUSaT HDU8UKocRI7O1RuqhAnWT9upJxZw9YbDqo0DOnkPMnHtEsJreaNz1fp+UEd8nOkYzEDW 9uR3Orx2fZUlrZGcTtbxzOu65bX68caWGnQlEgn1C7Fp7rzAxf6j794O+pRGTlZE4Vf1 RrR5S4ZA3Xo6D4MuRJ9UD/Tb5d2VgBnyvCXzNvKKi6o2Xt3Vg23xidEp2E0My3Tkw2h1 1N56mWNAcsCez2LE+Fx+NYAfASQsI55RS5ufj/cD124mFleghkZmG1z+Byyu9KoB1o+o szgw== X-Received: by 10.60.65.8 with SMTP id t8mr12344375oes.47.1411634699813; Thu, 25 Sep 2014 01:44:59 -0700 (PDT) Original-Received: by 10.76.41.242 with HTTP; Thu, 25 Sep 2014 01:44:59 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::22e X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:100137 Archived-At: Dear Pascal J. Bourguignon, no need for an abuses, don't be a barbarian. I am always heard and was sure that the buffers flushes on a =C2=ABnewline=C2=BB. That's weird to me that it is wrong, but after your = words I googled, and found that this is indeed a truth. Thx anyway for the answer, I surely wouldn't found it soon by myself. >> When I am working on Windows, I am using Emacs =C2=ABshell=C2=BB mode. T= he >> problem is that it sometimes doesn't prints an applications output >> (more precisely prints only after the app died). >> The problem is present exclusively in Emacs, e.g. if I am run an >> application in Windows=C2=AE native terminal, it is works fine. >> >> I thought that the problem is in encoding, and set =C2=ABshell=C2=BB's b= uffer >> with =C2=ABC-x f=C2=BB to UTF-16, which, as I know, uses MS, but i= t didn't >> fixed the problem. > >1- this is not an emacs problem. > >2- this is a basic programming question, that dates back since the dawn >of computing. > >3- what the fuck are you taught in school? > > >> Below is a simple example of an application that won't print an output i= n Emacs: >> >> #include >> #include >> >> int main(){ >> puts("Hello, enter something"); >> char buf[256]; >> memset(buf, 0, sizeof(buf)); >> fgets(buf, sizeof(buf)-1, stdin); >> puts(buf); >> return 0; >> } >> >> This works fine in both GNU/Linux, and the terminal of Windows=C2=AE, > >By pure chance. > >> but not in Emacs shell mode on Windowsor. > > >YOU FORGOT TO FLUSH YOUR BUFFERS!