[lipstick] Functionality to kill or restart the owner of a compositor window

Any suggestions on how to get the restarting right? Just read the environment from /proc/pid/environ and spawn using /proc/pid/cmdline? Do any helpers exist for this?