delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/06/22/09:57:59

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=DUM4h8my0q2pkHGL
+rJiA3LLGL+fyjGZw4AISRG7QmMzf0Z17cHwcVDxT7byjrO34AXz20eaYvHQq2Xk
ijkbXd70Ek9dNkX4FyGWTe5GdMxlFj2a8ivXTYr5a9GUck8IBcVPvyvGh75ZUbuU
9G+oHC87U+XJ1Xl/Ev2BHFkIdUA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=yXeQNvAJvXYeK5XkcFYOOP
g9hys=; b=mXWE3RgtJhNZNf07l1N+/6tnhwUti4ost8GT729uE1ngHHZZdrclcs
cDEFkZeb6okzvdD3iO9nztm1DXpVO+yhwMFY0Cr8IMhW43exBCNS8tznMWcQ0FmM
DEJsoItSaomCFWY5JOp4wsufSaDI54wNrvtSuAlBepn5tk4ADKb7E=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=online
X-HELO: mail-it0-f42.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=t7WV5iJxgIZJB7GSt4onmW4HT/35oKa2bXv5a26ScaA=; b=X1K5mVXM8OXuo1yI5AQJGjQv979VPjlW2ilAZrVrDdpw5oVZaVkgIKturoOsR59ptw GO4t5VpPn/TW5BGtZGGketIWXafux+E1oPUcfgWrzWY/QqIDYO4F+v2oiRBbrnzZiZyU gu3vAx3O+sKs25IlT44aV4d64fhQZcKCGVxKMtJd59743o1uWHvRsBdYOxdkjykc/KE2 8aPsKkGXlwZaRVBnf3PlfxJHmghu7wfd/XubLU0nZLcImcoLVBgo1/0i2cIiAMknrUvE P1A0TKpfmqg84WYNorSkJZW02RuTFVI1McpU7agz6qkXx48ZqTl92O6hjlO+E4lpr07E Goig==
X-Gm-Message-State: AKS2vOzXts0INIOMhPPGviSLha34NO5QKOdBMce9qrL1utdcegsdxtpl YUczQSmFjU5taUrj
X-Received: by 10.36.122.194 with SMTP id a185mr2050265itc.24.1498139860540; Thu, 22 Jun 2017 06:57:40 -0700 (PDT)
Subject: Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd
To: cygwin AT cygwin DOT com
References: <CANZ2p_ckjzWEp0uPoJ8MAXh=0B6ZhWQVt9v_NmsFP-fpoX-sEg AT mail DOT gmail DOT com> <oiepk2$78o$1 AT blaine DOT gmane DOT org> <CANZ2p_cpjbjvZfOgSKAmsCT92QHC1i-yPc2BosJgL6u4LCdypQ AT mail DOT gmail DOT com>
From: cyg Simple <cygsimple AT gmail DOT com>
Message-ID: <4eae81da-6519-b071-7146-b7396b547d34@gmail.com>
Date: Thu, 22 Jun 2017 09:57:41 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0
MIME-Version: 1.0
In-Reply-To: <CANZ2p_cpjbjvZfOgSKAmsCT92QHC1i-yPc2BosJgL6u4LCdypQ@mail.gmail.com>
X-IsSubscribed: yes

> 
> STOP PRESS: in gdb, the output IS there:
> User-PC-> gdb hello.exe
> GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1
> Copyright (C) 2015 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-cygwin".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
> <http://www.gnu.org/software/gdb/documentation/>.
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from hello.exe...done.
> (gdb) run
> Starting program: /home/User/c_dir/hello.exe
> [New Thread 6868.0x5b0]
> [New Thread 6868.0x18dc]
> [New Thread 6868.0x1990]
> Hello, world!
> [Thread 6868.0x1990 exited with code 0]
> [Inferior 1 (process 6868) exited normally]
> (gdb)
> 
> Which is dandy, but then why, outside of gdb, is there nothing at all?
> Still stumped!

Is your prompt overwriting the output of the program?

Try:

$ hello | cat
$ hello | grep ello

etc.

-- 
cyg Simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019