Only foreground process is terminated on ctrl-c