Skip to content

Instantly share code, notes, and snippets.

@shinh
Created December 13, 2021 07:55
Show Gist options
  • Save shinh/5c3a87b845cc9952bddf1713efd4d215 to your computer and use it in GitHub Desktop.
Save shinh/5c3a87b845cc9952bddf1713efd4d215 to your computer and use it in GitHub Desktop.
export command
pp=$(gdb -q -p $PPID -batch -ex "p (int)getppid()" -ex "quit" | awk '/^\$1 = / {print $3}')
gdb -q -p $pp -batch -ex "p (int)putenv(\"$1\")" -ex "quit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment