From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74819 invoked by alias); 19 Jun 2019 19:17:16 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 74812 invoked by uid 89); 19 Jun 2019 19:17:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=Jon, jon, Turney, turney X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.138) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Jun 2019 19:17:14 +0000 Received: from [192.168.1.114] ([24.64.172.44]) by shaw.ca with ESMTP id dg51hy4a3Gusjdg52hMnLk; Wed, 19 Jun 2019 13:17:12 -0600 Reply-To: Brian.Inglis@SystematicSw.ab.ca Subject: Re: Windowless Perl To: cygwin@cygwin.com References: <5eebff75b1f37a968325ed4fc7dce3a8@plebeian.com> <87a7epgs5t.fsf@Rainer.invalid> <3a0322aa51937847ea35009b77c1aa34@plebeian.com> <5CFFEF09.6010805@tlinx.org> <1581789244.20190618182709@yandex.ru> From: Brian Inglis Openpgp: preference=signencrypt Message-ID: <2be58beb-b51d-1b56-01d5-768742ba41ec@SystematicSw.ab.ca> Date: Wed, 19 Jun 2019 19:17:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00178.txt.bz2 On 2019-06-18 12:15, Jon Turney wrote: > On 18/06/2019 16:27, Andrey Repin wrote: >>> On 2019/06/10 13:12, Chris Wagner wrote: >>>> I didn't know about run, thanks for the tip. However when I use it to >>>> launch something from the Start Menu Run command, it still pops open a >>>> terminal window of some kind for a fraction of a second. I'm on >>>> Windows 7. >>> Windows has a flag set in each EXE as to whether or not it is a console >>> or GUI program. There are tools that can set the flag in a given EXE >>> file. >> It's not a flag, it's an exported function. >> If a program exports winmain(), it's a gui program, if it exports main(), >> it's a console program. > No. It really is a flag. Strictly speaking a field flag value: $ objdump -x $(dirname $(cygpath $COMSPEC))/csrss | grep -w '^Subsystem' Subsystem 00000001 (NT native) $ objdump -x /setup | grep -w '^Subsystem' Subsystem 00000002 (Windows GUI) $ objdump -x /bin/cygwin1.dll | grep -w '^Subsystem' Subsystem 00000003 (Windows CUI) > See > https://docs.microsoft.com/en-us/windows/desktop/debug/pe-format#windows-subsystem > You are describing the behaviour of (recent versions of) the Microsoft linker, > which guesses the default value of this flag based on what symbols are defined > See > https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symbol, > specifically the sentence "If the /DLL or /SUBSYSTEM option is not specified, > the linker selects a subsystem and entry point depending on whether main or > WinMain is defined." -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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