Mr.UNOwen 0 Junior Poster

Hello,

Does anyone have a clue why using setitimer() and SIGALRM won't work if you modify the terminal using termios.h?

Every time I run it I get segfault or the original signal handler (not the one I set).

Just having

struct termios oldTerm, newTerm;

seems to cause trouble.

If I remove that code, it seems to behave just fine.

Anyone have a clue?

BTW, I'm using Ubuntu.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.