In certain scenarios such as batch rendering, Maya may hang during network name resolution. If this occurs, verify your network settings and make sure that your operating system is capable of resolving localhost to the current machine.
If you are using the Mac OS X platform, refer to the documentation for your OS for information on how to troubleshoot scenarios where Mac OS X cannot resolve localhost.
In general, you can try editing the system file /etc/hosts and updating the line entry:
127.0.0.1 localhost enterHostNameHere
where enterHostNameHere is the name of the host machine, and the output from the Mac OS X command: hostname.