Added global mutex(phutex).
Removed action on trapping SIGTERM.