Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pause(2) [linux man page]

PAUSE(2)						     Linux Programmer's Manual							  PAUSE(2)

NAME
pause - wait for signal SYNOPSIS
#include <unistd.h> int pause(void); DESCRIPTION
pause() causes the calling process (or thread) to sleep until a signal is delivered that either terminates the process or causes the invo- cation of a signal-catching function. RETURN VALUE
pause() only returns when a signal was caught and the signal-catching function returned. In this case pause() returns -1, and errno is set to EINTR. ERRORS
EINTR a signal was caught and the signal-catching function returned. CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001. SEE ALSO
kill(2), select(2), signal(2), sigsuspend(2) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2008-10-06 PAUSE(2)

Check Out this Related Man Page

PAUSE(3P)						     POSIX Programmer's Manual							 PAUSE(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
pause - suspend the thread until a signal is received SYNOPSIS
#include <unistd.h> int pause(void); DESCRIPTION
The pause() function shall suspend the calling thread until delivery of a signal whose action is either to execute a signal-catching func- tion or to terminate the process. If the action is to terminate the process, pause() shall not return. If the action is to execute a signal-catching function, pause() shall return after the signal-catching function returns. RETURN VALUE
Since pause() suspends thread execution indefinitely unless interrupted by a signal, there is no successful completion return value. A value of -1 shall be returned and errno set to indicate the error. ERRORS
The pause() function shall fail if: EINTR A signal is caught by the calling process and control is returned from the signal-catching function. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
Many common uses of pause() have timing windows. The scenario involves checking a condition related to a signal and, if the signal has not occurred, calling pause(). When the signal occurs between the check and the call to pause(), the process often blocks indefinitely. The sigprocmask() and sigsuspend() functions can be used to avoid this type of problem. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
sigsuspend(), the Base Definitions volume of IEEE Std 1003.1-2001, <unistd.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 PAUSE(3P)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sleep

what is the purpose of the sleep command? (5 Replies)
Discussion started by: Anna
5 Replies

2. UNIX for Dummies Questions & Answers

In need of help!!

Ahhh!! I am not very bright and I ask too many questions. I was trying to install the Enlightenment windows manager from a RPM to my RedHat 7.1 system which currently uses the GNOME GUI. When I clicked on "install" in my file manager, I get a short pause (my systems is a P120 w/ 24 Mb RAM!! I do... (3 Replies)
Discussion started by: pantera
3 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. Shell Programming and Scripting

the shell not pause when execute read command

Hi, i facing a problem when run the script below.. while do if then printf "Please enter a name : " read response # the problem occur here if then ea_ident=${omc_ident} else # # Check that name does not contain invalid... (14 Replies)
Discussion started by: neruppu
14 Replies

6. Shell Programming and Scripting

Pause for response from the log file

Hello, I am writing a shell script to search an active log file. If an "error" or "aborted" found, echo an acknowledgment message and wait until the user presses ENTER key. tail -f log.file |nawk ' {print $0} $0 ~ /error/ { print "Error found. Press ENTER to acknowledge." getline i < "-"... (3 Replies)
Discussion started by: gxdanh
3 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

Script Pause Until Rsync Is Done Transferring

Alright, I have this script that pulls files from a few locations, process those files, creates a zip file, rsync's it and then removes everything. The problem that I'm having is that I do not know how large the rsync'ed zip file is going to be. Right now I'm using a sleep command before I... (4 Replies)
Discussion started by: droppedonjapan
4 Replies

9. Shell Programming and Scripting

How to pause a shell script

Hi, I've written a shell script to take photos with my camera. After every picture taken, the picture is transmitted to the computer via usb and then deleted on the camera. But sometimes there's an error and the picture is not deleted and so, after a certain time, the camera chip will be... (4 Replies)
Discussion started by: McLennon
4 Replies

10. Shell Programming and Scripting

Pause shell script till folder doesn't change size anymore

Hi, I recently would like to write a shell script that 1. Runs in the background (can be done with "&", but i'd be happy for other solutions to keep programs running) 2. Does its stuff 3 THEN checks a specified folder for a size change over time (say, each 5 seconds. AND ONLY continues with... (9 Replies)
Discussion started by: pasc
9 Replies

11. Shell Programming and Scripting

How to ring the system bell many times without pause?

I am writing a ksh script in cygwin though it could just as easily be bash and am trying to make an alert for myself where the bell rings many times like print '\a'or echo '^G'except I want it to ping me many times not just once. For some reason doing print '\a\a\a\a\a\a\a\a\a\a'or similar... (7 Replies)
Discussion started by: benalt
7 Replies

12. Shell Programming and Scripting

How to have my ksh script pause, until something appears in the logs.?

All, Is there some way to have my KSH script pause, until the word "DONE!" appears in the logfile /logs/log.txt? Difficulty: The word "DONE!" may already be present in logs from the past. So I anticipate tail -0f may (somehow?) need to be done in the background, instead of grepping in a... (16 Replies)
Discussion started by: chatguy
16 Replies

13. Shell Programming and Scripting

Creating a script requiring a pause for user input

Hi I'm trying to create a basic script that pauses for user input to verify a file name before generating the output. I have numerous SSL certificate files which I am trying to determine the expiry date so what I'm trying to do is write a script so that is pauses to request the name of the .pem... (9 Replies)
Discussion started by: Buddyluv
9 Replies

14. 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

15. Shell Programming and Scripting

Need a script to autopause clementine on skype call

I am a linux user (PcLinuxOs desktop 64bit kde5). I am looking for a script (bash or python) to autopause clementine (a music player) on skype call. VLC works: autopause on skype call and at the end resume). Clementine automute, but not autopause, on skype call. I am absolute beginner with the... (17 Replies)
Discussion started by: duns
17 Replies