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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=GCZVt+G7y/cpRHYw 6NZ2ioFLG6tKU+lRZT6tfeKRNlp2FCowthUzhxtPQ1VSaC+Bc6tIiCvKvXk6W/XB WFRmueh5PhqZK7M9Z2wG3b4hXvg8M1uOfX6KprmH4PFPc2hbk06qrTEJG/Ouxx34 fE1POpEZbwh54ck3zHziLHI+Y1w= 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:date:from:reply-to:message-id:to:subject :in-reply-to:references:mime-version:content-type :content-transfer-encoding; s=default; bh=CDDh7Q8ZzNF4P98wgpV8/f saSdQ=; b=GRqg563Ba5I5K7HgusiYy9z7BozXRptLwWrrwyYRkQZjQ3fmif/gmE dNJHnn9+pkxheFt5KQNKQrgqvpwIhKdlDVHo8MPHWWI8AYh0wN3lCzX3nSBFiIDZ ErNmAFILOO/+7y5PIxXLa3gD6rHrf3CpoKun0nJ3/0laHQZ7Wcb5w= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 spammy=H*M:yandex, H*RU:192.168.1.10, H*r:ip*192.168.1.10, Hx-spam-relays-external:192.168.1.10 X-HELO: forward3p.cmail.yandex.net Authentication-Results: smtp2p.mail.yandex.net; dkim=pass header.i=@yandex.ru X-Yandex-Suid-Status: 1 0,1 0 Date: Fri, 23 Jun 2017 03:49:02 +0300 From: Andrey Repin Reply-To: cygwin AT cygwin DOT com Message-ID: <412348511.20170623034902@yandex.ru> To: Wouter van Doorn , cygwin AT cygwin DOT com Subject: Re: Compiled programs fail to run from Cygwin Terminal, but work from windows cmd In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-IsSubscribed: yes Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id v5N0oURj020381 Greetings, Wouter van Doorn! > On 22 June 2017 at 15:08, René Berber wrote: >> On 6/22/2017 8:13 AM, Wouter van Doorn wrote: >> >> [snip] >>> STOP PRESS: in gdb, the output IS there: >>> User-PC-> gdb hello.exe >>> GNU gdb (GDB) (Cygwin 7.10.1-1) 7.10.1 >> ... >>> 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? >> >> What is "outside"? >> >> Are you running this from mintty (recommended) or the Cygwin.bat cmd window? >> >> Which shell? (i.e. echo $SHELL) > With 'outside', I meant a normal run not involving gdb at all. Sorry > if I was unclear. > Yes, it's minty, and it's /bin/bash. > Out of desperation, I have added a sleep for two seconds both before > and after the printf statement. The sleep does not happen either! The > prompt is immediately back, so it's more than just 'no output', it > seems my code never even gets started. Does this shed any new light? Did you try to rebase your program? P.S. And did you try to not top-post in this list? Thank you in advance. -- With best regards, Andrey Repin Friday, June 23, 2017 03:48:14 Sorry for my terrible english... -- 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