windows:wsl
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
windows:wsl [2019-08-11 01:01] – ssh-agent hack gabriel | windows:wsl [2019-08-18 22:18] – [Using ssh-agent with multiple shell sessions] updated to include check for open shells gabriel | ||
---|---|---|---|
Line 34: | Line 34: | ||
< | < | ||
- | # start ssh-agent | + | # start ssh-agent |
- | SSHAGENTINFO=/ | + | SSHAGENTINFO=/ |
if [ -f $SSHAGENTINFO ]; then | if [ -f $SSHAGENTINFO ]; then | ||
printf " | printf " | ||
Line 48: | Line 48: | ||
< | < | ||
- | # shut down our ssh-agent when we close the shell | + | # shut down our ssh-agent when we close the final shell |
- | ssh-agent -k && rm -f / | + | SHELLPIDS=$( pgrep bash ) |
+ | SHELLCOUNT=$( echo $SHELLPIDS | wc -w ) | ||
+ | if [[ $SHELLCOUNT -eq 1 ]]; then | ||
+ | | ||
+ | fi | ||
</ | </ |
windows/wsl.txt · Last modified: 2019-08-18 22:20 by gabriel