Code for proc_open support