Skip to content

Instantly share code, notes, and snippets.

@Hiteshm01
Last active August 29, 2015 14:15
Show Gist options
  • Save Hiteshm01/3413516bfaef5134a749 to your computer and use it in GitHub Desktop.
Save Hiteshm01/3413516bfaef5134a749 to your computer and use it in GitHub Desktop.
To update environment variable of a running process
$> sudo apt-get install gdb
$> sudo su
$> gdb
(gdb) attach process_id # insert process id instead of process_id
(gdb) call putenv ("env_var_name=env_var_value") # Add environmental variable
(gdb) detach # detach with option y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment