Skip to content

[DxD] closeOnExit should be sensible when launched via defterm #13325

Closed

Description

Windows Terminal version

Windows Terminal Version: 1.13.11432.0

Windows build number

Microsoft Windows [Version 10.0.22000.739]

Other Software

No response

Steps to reproduce

  1. Turn PC on
  2. Wait approximately 30min
  3. Windows Terminal opens with error "ERROR: The specified directory does not exist."

Expected Behavior

Windows Terminal shouldn't opens every time I turn PC on.

Actual Behavior

Every time I turn PC on and approximately after 30min Windows Terminal automatically opens new windows terminal with error "ERROR: The specified directory does not exist." WT startup is turned off. I don't use additional script to open WT.
Screenshot of the error https://prnt.sc/OTSf0FKHT9Dt
Full tab path C:\WINDOWS\System32\forfiles.exe

Activity

  1. added
    Issue-Bug
    on Jun 19, 2022
  2. ghost added
    Needs-Triage
    on Jun 19, 2022
  3. ghost added
    Needs-Tag-Fix
    on Jun 19, 2022
  4. zadjii-msft commented on Jun 20, 2022

    @zadjii-msft
    Member

    Full tab path C:\WINDOWS\System32\forfiles.exe

    Sounds like you've got the Windows Terminal set up as the default terminal emulator, and something you have installed is running a forfiles command. That forfiles is automatically launching in a Terminal window, instead of a console window. However, the Terminal doesn't automatically close when a commandline application exits with an error, unlike the console.

    Now, trick here is that forfiles here isn't actually telling you what the missing directory is, just that it couldn't find it. I honestly don't know how you'd figure out who's launching that.

    You might be able to mitigate this by setting closeOnExit: always in the profiles.defaults part of the settings.

    I think we had previously discussed defterm invocations defaulting to that value - lemme bring that up with the team again.

  5. added
    Needs-Discussion
    on Jun 20, 2022
  6. zadjii-msft commented on Jul 8, 2022

    @zadjii-msft
    Member

    🌶️ take: for a defterm session, if the profile doesn't have a closeOnExit set, we treat that as always, instead of graceful. We'd need to change that setting to an optional, but because it gets exposed from Profile as a winrt type, it'd need to be an IReference<CloseOnExitMode>, which is a little gross.

  7. zadjii-msft commented on Jul 11, 2022

    @zadjii-msft
    Member

    discusssion:

    • is "close on exit" for things started by the Terminal? Can we just reframe graceful to "always" for defterm?
    • Meh, lets do the optional thing above?
    • Meh lets just just do always as the default?
    • Maybe we should have an setting between always and graceful "always so long as we actually got some bytes out of the connection"
    • but uhg, that's not actually helpful for defterm
    • you can't actually set graceful explicitly in the SUI - the profile will already say you're set to "graceful"
    • Maybe there needs to be "gracefulIfLaunchedByTerminal", which is the new default, which is "always" for defterm. It's annoying but okay.
  8. added
    Product-Terminal
    Priority-1
    and removed
    Needs-Discussion
    on Jul 11, 2022
  9. ghost removed
    Needs-Tag-Fix
    on Jul 11, 2022
  10. changed the title [-]ERROR: The specified directory does not exist.[/-] [+][DxD] `closeOnExit` should be sensible when launched via defterm[/+] on Jul 11, 2022
  11. ghost added
    In-PR
    on Jul 21, 2022
  12. ghost closed this as completedin #13560on Aug 1, 2022
  13. ghost removed
    In-PR
    on Aug 1, 2022
  14. ghost added a commit that references this issue on Aug 1, 2022
    89d57e8
  15. ghost added
    Resolution-Fix-Committed
    on Aug 1, 2022
  16. added a commit that references this issue on Aug 8, 2022
    b68de3e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Area-DefAppIssue-BugNeeds-TriagePriority-1Product-TerminalResolution-Fix-Committed

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions