View Full Version : Unix equivalent to Windows PAUSE?

Nov 26, 2010, 12:49 PM

Programming teacher gave us an example of a larger project using multiple files. It is a Dev C++ project that I have gotten to mostly work as an Xcode command line tool project. However, the old code makes use of the system("PAUSE"); call which is obviously Windows-only and has to be commented out.

So when I try to run the executable, you enter the data and the terminal window goes "poof". :D


Nov 26, 2010, 12:56 PM
According to http://www.softpanorama.org/Internals/unix_system_calls.shtml there are two system calls that could potentially be useful for this purpose: wait() and sleep(). I think sleep() is what you want, though.

Nov 26, 2010, 01:06 PM
Ah yes, that's exactly what I needed. Thanks!