cw.c: simplify establishing signal handlers.