[BUG #7935] catch Ctrl-C in generate.py

- it was generate.py, not generator.py, that produced the stack traces
- this works for all jobs, source, watch, source-server, ...
(cherry picked from commit d20242b1166a33a0f8dde3fb7145f24c166b96a6)