working  parent function and sigreceived