Added ppid for identifying host and PID of parent. Also changed global to a normal variable.