Last active
February 22, 2022 15:38
-
-
Save coderofsalvation/e1376e4d2b29607431df to your computer and use it in GitHub Desktop.
Revisions
-
coderofsalvation revised this gist
Jun 24, 2015 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ # updates an environment variable of a running process (needs sudo) # example: sudo export_pid <variable=value> <pid> export_process(){ script=/tmp/.gdb.$2 echo -e "attach $2\ncall putenv (\"$1\")\ndetach\n" > $script gdb -q -batch -x $script &>/dev/null rm $script } -
coderofsalvation created this gist
Jun 24, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ # updates an environment variable of a running process # example: export_pid <variable=value> <pid> export_process(){ script=/tmp/.gdb.$2 echo -e "attach $pid\ncall putenv (\"$1\")\ndetach\n" > $script gdb -x $script rm $script }