I'd like a way to uniquely identify the current screen process while
evaluating .screenrc. The specific problem I'm trying to solve is tying an
ssh-agent process to the life of a set of screens.

If I could get the current (SCREEN) process id inside .screenrc, this would
have a two line solution:

setenv SSH_AUTH_SOCK $HOME/.screen-ssh-agent.$PID
screen 10 ssh-agent -a $SSH_AUTH_SOCK $SHELL

To that end, I've added a PID variable to process.c:Parse(). It's a simple,
two-line patch.

You can find the change as
commit 9ac452ce309a7d60fe1bd7d77b65146287f33c0f in the "pid" branch here:
git://github.com/pteichman/screen.git

I branched from 4.0.3, but it applies cleanly against master.

Cheers,
Peter

Reply via email to