Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pause(3) [netbsd man page]

PAUSE(3)						   BSD Library Functions Manual 						  PAUSE(3)

NAME
pause -- stop until signal LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <unistd.h> int pause(void); DESCRIPTION
Pause is made obsolete by sigsuspend(2). The pause() function forces a process to pause until a signal is received from either the kill(2) function or an interval timer. (See setitimer(2).) Upon termination of a signal handler started during a pause(), the pause() call will return. RETURN VALUES
Always returns -1. ERRORS
The pause() function always returns: [EINTR] The call was interrupted. SEE ALSO
kill(2), poll(2), select(2), setitimer(2), sigsuspend(2) STANDARDS
The pause() function conforms to ISO/IEC 9945-1:1990 (``POSIX.1''). HISTORY
A pause() syscall appeared in Version 6 AT&T UNIX. BSD
June 4, 1993 BSD

Check Out this Related Man Page

pause(2)							   System Calls 							  pause(2)

NAME
pause - suspend process until signal SYNOPSIS
#include <unistd.h> int pause(void); DESCRIPTION
The pause() function suspends the calling process until it receives a signal. The signal must be one that is not currently set to be ignored by the calling process. If the signal causes termination of the calling process, pause() does not return. If the signal is caught by the calling process and control is returned from the signal-catching function (see signal(3C)), the calling process resumes execution from the point of suspension. RETURN VALUES
Since pause() suspends thread execution indefinitely unless interrupted by a signal, there is no successful completion return value. If interrupted, it returns -1 and sets errno to indicate the error. ERRORS
The pause() function will fail if: EINTR A signal is caught by the calling process and control is returned from the signal-catching function. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ |MT-Level |Async-Signal-Safe | +-----------------------------+-----------------------------+ SEE ALSO
alarm(2), kill(2), signal(3C), wait(3C), attributes(5), standards(5) SunOS 5.11 28 Dec 1996 pause(2)
Man Page

12 More Discussions You Might Find Interesting

1. Programming

system("PAUSE") Problem.....

Ok, here's the situation....I have this code... #include <iostream.h> #include <stdlib.h> int main() { cout << "\nBlah, and Blah\n\n"; system("PAUSE"); return 0; } Now, "system("PAUSE")" gets executed before "cout" does, and I have... (2 Replies)
Discussion started by: mbolthouse
2 Replies

2. UNIX for Dummies Questions & Answers

how to pause another process?

I guess I posted in wrong forum before. How do I pause another process and then restart it on linux? The other process doesn't listen for anything. Thanks for any help you can offer. Dane :confused: (1 Reply)
Discussion started by: daneensign
1 Replies

3. Programming

pause? where art thou?

ok, im somewhat of an advanced programmer for the windows-side of C/C++, and the system command to pause the console is 'system("pause");'.... i just recently transfered over to Slackware 3.3 (yes, its old, but i <3 text), and pause is not the command for pausing the command line. is there any... (3 Replies)
Discussion started by: 01000101
3 Replies

4. UNIX for Dummies Questions & Answers

pause needed for corn shell

I need a user pause for a script file, like the pause command in dos. please help I thought it was the corn shell it is csh. (7 Replies)
Discussion started by: dennysavard
7 Replies

5. Programming

newbie to unix programming in C, needed a few simple prgs on these functions!

Hi all, I am a newbie to unix programming using C.. So i would like to have a few simple C programs to start off with.. I wanted programs on learning , abort,kill and raise,alarm and pause,I would also like to know how to use the vfork() in a prg It would be really great if i can have... (1 Reply)
Discussion started by: wrapster
1 Replies

6. UNIX and Linux Applications

stopclock coding in javascript.

i have got a problem in this coding.i have got start/pause in the same button.wen i open that page the stopclock runs automatically.wen i click pause it get paused in the frontend textbox bt running in the backend.wen i again click that start itz starting from the time without considering that... (2 Replies)
Discussion started by: VIJI
2 Replies

7. HP-UX

Any Way to pause/unpause system execution in HP-UX 11.11 and 11.23?

This may seem like an odd question, but I've heard that on old Alpha servers running OpenVMS, you could pause the system so that the OS is essentially suspended for a small period of time, then unpause it and it would pick up where it left off. During the pause, all CPU cycles would be halted, all... (3 Replies)
Discussion started by: deckard
3 Replies

8. Shell Programming and Scripting

Newbie question-do I pause and exec my shell scripts?

Hi there, I'm writing a script to restore 3 directories and 3 mysql db's every 24 hours. While writing the script, I came across the thought... Do I need to pause between executions? Example: msql restore1.sql rm -Rf path1/* cp -Rf path1/* /restore1 chmod 777 /folder1/cache1 ... (2 Replies)
Discussion started by: semiotics101
2 Replies

9. Programming

Help understanding pointer assignment in c

after some years of pause, im returning to c. char *varname = "asd"; int *number = 4; the above code is wrong, because its assigning a value to an unreserved space, or because its changing the address the pointer is pointing ? thanks for the replys!! (3 Replies)
Discussion started by: broli
3 Replies

10. UNIX for Advanced & Expert Users

I need help with SIGIO and the terminal..

I want write a program where I call the pause() function to wait for any signal. Now I have registered the SIGIO signal with the following lines of code: const int on = 1; fcntl(STDIN_FILENO,F_SETOWN,getpid()); ioctl(STDIN_FILENO, FIOASYNC, &on); ioctl(STDIN_FILENO,... (0 Replies)
Discussion started by: ronycsdu
0 Replies

11. Programming

Query on signal delay

Hi I have used setitmer function in C to notify the occurence of an event . setitimer function generates a SIGLALRM signal which I handled through a defined handler using signal system call. There are multiple processes running and using this handler to handler the SIGALRM . The handler is... (1 Reply)
Discussion started by: anktim
1 Replies

12. Shell Programming and Scripting

Pause before exit

6) printf "\n GoodBye! \n\n"; exit ;; I am trying modify the above command to pause a couple of seconds before exiting, so a message can be displayed. Thank you :). (8 Replies)
Discussion started by: cmccabe
8 Replies