I'd like to create an AutoClose RAII class, but I see there are different functions (like fclose() & pclose()) that have the same signature but different names (i.e. they both take FILE* parameters).
I'm pretty sure the answer is going to be "that's undefined behavior", but I'll ask it anyways... What would happen if you mix fopen()/pclose() or popen()/fclose()?