Is there something like system("PAUSE") for linux?

解决方案In article , Paminu wrote:

:Is there something like system("PAUSE") for linux?

As far as this newsgroup is concerned, the exact replacement is

system("PAUSE");

That''s because as far as this newsgroup is concerned, PAUSE has

an unidentified system-dependant function. If the functionality of

PAUSE were to be described, then a Unix or Linux newsgroup would be

able to tell you what the nearest Linux equivilent would be.

On some systems, PAUSE means "suspend CPU activity on the system until

there is an interrupt". On others, it means "suspend the active process

for 1 second". On others, it means "flush any pending output and

wait until a key is pressed and then continue (without waiting for

a newline.) On others, the newline is required. On others, it means

"print the error message associated with not finding a named program

or command". On others it means "look for an executable program

named PAUSE in the current directory and execute it, with whatever

consequences that has." Others yet it would mean "look for an

executable program named PAUSE in the currently defined list of

program locations, and execute it, with whatever condequences that has."

Possibly the most common meaning, though, is "Play a recording

of your voice telling the dog to get his paws off of the furniture."

If that''s the one you were looking for, see section 93.11 of the

Linux FAQ, which discusses the various ways of getting high-fidelity

playback of His Master''s Voice on various kinds of sound cards

and Midi Synthesizers.

--

All is vanity. -- Ecclesiastes

Paminu writes:Is there something like system("PAUSE") for linux?

We don''t know. Try a Linux or Unix group. comp.unix.programmer is a

likely place to ask about this -- but first explain what

system("PAUSE") means.

But first, try reading the documentation that comes with the system.

--

Keith Thompson (The_Other_Keith) ks***@mib.org

San Diego Supercomputer Center

We must do something. This is something. Therefore, we must do this.

Paminu wrote:Is there something like system("PAUSE") for linux?

This is off-topic for comp.lang.c, you should have posted to

comp.unix.programmer. However, I have written a clone of the MS-DOS

pause command for Linux, and I can give you a link to it here.

http://members.optushome.com.au/sbiber/pause-1.0.tar.gz

It should work on other Unix-like systems too. Extract it, change to the

directory pause-1.0, and type

make

to build, and you can type

sudo make install

to copy the executable to /usr/local/bin

--

Simon.

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐