tty variable not updated for restored sessions after restart of iTerm
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: Build 3.3.20190407-nightly
- OS version: macOS 10.14.3 (18D109)
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window)
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Are you reporting a performance issue, excessive CPU usage, or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
- Are you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
Detailed steps to reproduce the problem:
- Start iTerm
- Enable "Use System Window Restoration Setting" in Preferences --> Startup
- Create two sessions
- In the last session verify that the associated terminal is different from /dev/ttys001. Let's say it is /dev/ttys002 in this case
- Add tty to the session title. It should say /dev/ttys002
- Close all other sessions
- Close iTerm
- Start iTerm
- The title of the restored sessions should now still be ttys002
- Run 'tty' in the restored session to get the associated terminal. In case there are no other terminals running the tty likely is /dev/ttys001.
What happened: The tty variable is still set to the previously associated terminal.
What should have happened: The variable should be updated with the new terminal device name.
Edited by Ulrik Stridsman