Forum > Linux

[SOLVED] Problem running external program under Linux

<< < (7/7)

MarkMLl:

--- Quote from: PascalDragon on July 30, 2021, 09:02:29 am ---The header of PE/COFF files contains a field that decides the subsystem of the executable (in this case GUI vs. CUI, there are also other values that are not important for this).

--- End quote ---

Yes, that was one of the things I was thinking about. It could be argued that Unix-style ELF etc. are deficient in their lack of this, and that their ability to check during startup is no substitute for telling the OS what resources might be needed before attempting to bring anything into memory.

MarkMLl

Gustavo 'Gus' Carreno:
Hey PascalDragon,


--- Quote from: PascalDragon on July 30, 2021, 09:02:29 am ---This is not quite correct. Windows evolved from DOS where the only possibility were console applications.

--- End quote ---

I was being a bit over-simplistic in my, wrongly, generalization of the issue.
I'm that old that I should not fall into these traps of doing so much generalization, but hey, here you go, me messing it up again :)


--- Quote from: PascalDragon on July 30, 2021, 09:02:29 am ---The header of PE/COFF files contains a field that decides the subsystem of the executable (in this case GUI vs. CUI, there are also other values that are not important for this). Applications that have the subsystem type CUI require a terminal, but not a console window, cause it's perfectly fine to execute console applications in e.g. a SSH session (when you connect to a Windows using SSH) or e.g. on the Windows IoT core variant of devices where you have either WinRT style apps or console applications. (Also when starting a process it can be requested to hide that window upon start)

TL;DR: If you start a CUI application from a process that does not have a terminal associated then Windows will automatically spawn a console window, but if a terminal is associated it will continue to use that.

--- End quote ---

I was not aware of that, at all.

As per usual, many thanks PascalDragon for the trove on invaluable info!!!

On a side note, where do Windows Services fall in all this, cuz they're the only ones, well that I know of, that don't need a Window associated with, right?

Cheers,
Gus

Navigation

[0] Message Index

[*] Previous page

Go to full version