If i set the process group (line 13), signal like CTRL-C, CTRL-Z is not sent to the process.
But if i remove that line signal works perfectly, Do you know why?
P.S if i open another terminal and i manually send the signal, it works perfectly (kill -INT -pid)
EDIT: I noticed that without using make, to run the application, it works too.
In short, it seems you've managed to detach yourself from the controlling terminal, without the other usual side effect of putting the process into the background.
> P.S if i open another terminal and i manually send the signal, it works perfectly (kill -INT -pid)
Because it doesn't rely on the whole foreground / background / controlling terminal mess.