Getting error when turning key logger off due to atexit() function

73 views Asked by At

I get a segmentation fault (core dumped) when turning off my key logger when there is an atexit() function in my code. This is confusing because the atexit() function should only be called when somebody attempts to exit the program (not simply when a command is given to turn off the key logger).

If I take out the line atexit(final) in my main, everything works properly. But I need atexit() function in my code to take care of what happens when the person exits the shell.

Thanks in advance.

0

There are 0 answers