add semaphor
close(fd)