News for hackers. Stuff that matters.
Re:A useful program, 0 bytes long by rca on Saturday June 22, 2013 @04:27AM (#5922960)
^Z sends a SIGSTOP no? I believe it can't be trapped (like SIGKILL). Actually i think the result of trying to trap it, is undefined (by posix)
Re:A useful program, 0 bytes long by thristian on Saturday June 22, 2013 @04:54AM (#5923016)
Vim puts the terminal in raw mode, so ^Z sends ^Z instead of SIGSTOP. When Vim receives a ^Z, it shuts down ncurses, returns the terminal to a sensible state, and sends itself SIGSTOP. When it gets SIGCONT, it sets up ncurses and reconfigures the terminal the way it wants again.
Re:A useful program, 0 bytes long by icebraining on Saturday June 22, 2013 @05:42AM (#5923074)
I believe ^Z sends SIGTSTP, which can be trapped.