pipe_sem as global var
pipe_sem as global var