delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/06/19/15:18:09

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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=UXPfRu4HK31E+VTi
G57wlSagk3DSZY0QohywMX61owtrwIUiHR42vw2W9tAErbFNl8HiUsdO8hzMNU3/
htNrdcbXeMBljl5JonF/s4k1O/40A4yuhX/XI2ANY0jbugRYrd2KBHRrHZ0OBisG
OatMdAX6+gkXJxJIjfSt1vdQUTI=
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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=uHCW3meBltPRU9vm8v0103
I2R+M=; b=ubO2WALp/GgSpN6b7g0EQpVeuXx6Qpwn4f8KOTXoG1ryG+c3ms7Qbf
bSDpTC7KsWaWV/4HrU/tfPKGBeP6QJPttf2+Xx2/UxW8x7FnCaIrdk/wLyu7/nWt
CZhInCO2yvgCJdLYLLJht4vLjvVfbQ9IFd7mTzT99rwNg1TfNy/xY=
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-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
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: Windowless Perl
To: cygwin AT cygwin DOT com
References: <5eebff75b1f37a968325ed4fc7dce3a8 AT plebeian DOT com> <87a7epgs5t DOT fsf AT Rainer DOT invalid> <3a0322aa51937847ea35009b77c1aa34 AT plebeian DOT com> <5CFFEF09 DOT 6010805 AT tlinx DOT org> <1581789244 DOT 20190618182709 AT yandex DOT ru> <dcdead25-3ee4-e3c1-ffe8-4feeabab34d0 AT dronecode DOT org DOT uk>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Openpgp: preference=signencrypt
Message-ID: <2be58beb-b51d-1b56-01d5-768742ba41ec@SystematicSw.ab.ca>
Date: Wed, 19 Jun 2019 13:17:11 -0600
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: <dcdead25-3ee4-e3c1-ffe8-4feeabab34d0@dronecode.org.uk>
X-IsSubscribed: yes

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

- Raw text -


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