From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: cygwin@cygwin.com
Subject: Re: Windowless Perl
Date: Wed, 19 Jun 2019 19:17:00 -0000 [thread overview]
Message-ID: <2be58beb-b51d-1b56-01d5-768742ba41ec@SystematicSw.ab.ca> (raw)
In-Reply-To: <dcdead25-3ee4-e3c1-ffe8-4feeabab34d0@dronecode.org.uk>
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
prev parent reply other threads:[~2019-06-19 19:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 17:56 Chris Wagner
2019-06-10 19:24 ` Achim Gratz
2019-06-10 20:13 ` Chris Wagner
2019-06-10 21:23 ` Bill Stewart
2019-06-11 18:12 ` L A Walsh
2019-06-18 15:35 ` Andrey Repin
2019-06-18 18:15 ` Jon Turney
2019-06-19 19:17 ` Brian Inglis [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2be58beb-b51d-1b56-01d5-768742ba41ec@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).