PowerShell tabs often stop with "process exited with code 5" #13653

Closed
opened 2026-01-31 03:48:30 +00:00 by claunia · 3 comments
Owner

Originally created by @SpitFire-666 on GitHub (Apr 28, 2021).

Windows Terminal version (or Windows build number)

1.7.1033.0

Other Software

OneDrive

Steps to reproduce

(I think this is what's happening)

  1. Have OneDrive installed/signed in
  2. Open a bunch of PowerShell tabs and CD to your OneDrive ( cd $env:\Onedrive )
  3. Open a PowerShell tab and CD to C:\ drive
  4. Put computer to sleep/hibernate
  5. Wake the computer

Expected Behavior

PowerShell tabs should remain available for use

Actual Behavior

The PowerShell tabs in the OneDrive path display
[process exited with code 5]

image

The busted tab will no longer receive any input.

Note that a normal PowerShell window seems unaffected.

Originally created by @SpitFire-666 on GitHub (Apr 28, 2021). ### Windows Terminal version (or Windows build number) 1.7.1033.0 ### Other Software OneDrive ### Steps to reproduce (I **think** this is what's happening) 1. Have OneDrive installed/signed in 2. Open a bunch of PowerShell tabs and CD to your OneDrive ( `cd $env:\Onedrive` ) 3. Open a PowerShell tab and CD to C:\ drive 3. Put computer to sleep/hibernate 4. Wake the computer ### Expected Behavior PowerShell tabs should remain available for use ### Actual Behavior The PowerShell tabs in the OneDrive path display `[process exited with code 5]` ![image](https://user-images.githubusercontent.com/38451588/116356068-1b09d500-a83e-11eb-9489-c753f718ddc4.png) The busted tab will no longer receive any input. Note that a normal PowerShell window seems unaffected.
claunia added the Issue-QuestionNeeds-Tag-FixResolution-Answered labels 2026-01-31 03:48:30 +00:00
Author
Owner

@skyline75489 commented on GitHub (Apr 28, 2021):

This feels like a PowerShell issue for me, since we really don't control when & how the shell exits.

@skyline75489 commented on GitHub (Apr 28, 2021): This feels like a PowerShell issue for me, since we really don't control when & how the shell exits.
Author
Owner

@DHowett commented on GitHub (Apr 29, 2021):

I'm guessing that this is because the OneDrive filter driver is disconnected and as part of that, any process holding a handle to that path is killed. There's nothing we can do about this[1].

If you wouldn't mind filing feedback on OneDrive (and possibly sharing the link here,) that would be lovely.

Thanks!

1: Traditionally, console applications would just disappear when they were killed. Terminal at least warns you! 😄

@DHowett commented on GitHub (Apr 29, 2021): I'm guessing that this is because the OneDrive filter driver is disconnected and as part of that, any process holding a handle to that path is killed. There's nothing we can do about this[1]. If you wouldn't mind filing feedback on OneDrive (and possibly sharing the link here,) that would be lovely. Thanks! 1: Traditionally, console applications would just disappear when they were killed. Terminal at least warns you! :smile:
Author
Owner

@SpitFire-666 commented on GitHub (Apr 30, 2021):

Hi @DHowett I can definitely provide feedback to OneDrive however I still find it odd that a normal PowerShell window does not suffer from this problem and remains responsive after sleep/wake (unlike the Terminal tab). Thoughts?

@SpitFire-666 commented on GitHub (Apr 30, 2021): Hi @DHowett I can definitely provide feedback to OneDrive however I still find it odd that a normal PowerShell window does not suffer from this problem and remains responsive after sleep/wake (unlike the Terminal tab). Thoughts?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13653