This is a common newbie error. The problem lies here:
The isdigit() function and all of it's issomething() functions take a single char as input. But, argv is a string, not a single char. This code is taking a string and shoving it down isdigit's throat, so it chokes and coughs up a seg fault.
The code needs to check each char in argv...
Have you actually tested the program with an invalid char, like a number, in the key? Try using the alphabet with a 2 instead of an a and see what it does.
It should be incredibly obvious why the program "timed out" while check50 was waiting for it to end.
The fix should be very obvious too. If not, leave a message.
If this answers your question, ...