What does the path to professorship in maths and computer science look like? I have a BS in math and a BS in computer science.  I attempted to get into a math PhD program right out of undergrad, but I was not prepared for the GRE subject test, so my applications did not go well.  I had to find a job while I thought up a new plan, and I have now been accepted to computer science PhD programs.

My ultimate goal is to be a professor and spend my life researching math topics in computer science, or just math.  I have a couple questions about getting to that point.  Should I get a PhD in math after getting one in computer science?  I read that math PhDs find faculty positions much more easily than any other kind of PhD.  Should I pursue a postdoc position at some point?  I don't want to be a "permadoc," as I've heard them called.  I also read that computer science PhDs often go to the private sector, but I don't think I'm interested in that.  What advice do you have to help me get where I want to be?
My ultimate goal is to be a professor and spend my life researching math topics in computer science, or just math. 


Not really. That is, it seems you are not seriously committed to any kind of research, you just like the idea of you being a professor. That is not good enough of a motivation. Don't presume to become a professional life-long researcher before you've done some significant research first. And you won't get such research done before you find a particular research subject (or a few subjects) which fascinates you, which is important to you enough emotionally that you want to spend a large chunk of your life exploring it.

When you tell us that you "want to research X. Or maybe Y"." - what I hear is: "I'm not particularly attached to any research problems."

So - your question is premature right now.