logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

pause.3p (2799B)


  1. '\" et
  2. .TH PAUSE "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. pause
  12. \(em suspend the thread until a signal is received
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <unistd.h>
  17. .P
  18. int pause(void);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIpause\fR()
  23. function shall suspend the calling thread until delivery of a signal
  24. whose action is either to execute a signal-catching function or to
  25. terminate the process.
  26. .P
  27. If the action is to terminate the process,
  28. \fIpause\fR()
  29. shall not return.
  30. .P
  31. If the action is to execute a signal-catching function,
  32. \fIpause\fR()
  33. shall return after the signal-catching function returns.
  34. .SH "RETURN VALUE"
  35. Since
  36. \fIpause\fR()
  37. suspends thread execution indefinitely unless interrupted by a signal,
  38. there is no successful completion return value. A value of \-1 shall
  39. be returned and
  40. .IR errno
  41. set to indicate the error.
  42. .SH ERRORS
  43. The
  44. \fIpause\fR()
  45. function shall fail if:
  46. .TP
  47. .BR EINTR
  48. A signal is caught by the calling process and control is returned from
  49. the signal-catching function.
  50. .LP
  51. .IR "The following sections are informative."
  52. .SH EXAMPLES
  53. None.
  54. .SH "APPLICATION USAGE"
  55. Many common uses of
  56. \fIpause\fR()
  57. have timing windows. The scenario involves checking a condition
  58. related to a signal and, if the signal has not occurred, calling
  59. \fIpause\fR().
  60. When the signal occurs between the check and the call to
  61. \fIpause\fR(),
  62. the process often blocks indefinitely. The
  63. \fIsigprocmask\fR()
  64. and
  65. \fIsigsuspend\fR()
  66. functions can be used to avoid this type of problem.
  67. .SH RATIONALE
  68. None.
  69. .SH "FUTURE DIRECTIONS"
  70. None.
  71. .SH "SEE ALSO"
  72. .IR "\fIsigsuspend\fR\^(\|)"
  73. .P
  74. The Base Definitions volume of POSIX.1\(hy2017,
  75. .IR "\fB<unistd.h>\fP"
  76. .\"
  77. .SH COPYRIGHT
  78. Portions of this text are reprinted and reproduced in electronic form
  79. from IEEE Std 1003.1-2017, Standard for Information Technology
  80. -- Portable Operating System Interface (POSIX), The Open Group Base
  81. Specifications Issue 7, 2018 Edition,
  82. Copyright (C) 2018 by the Institute of
  83. Electrical and Electronics Engineers, Inc and The Open Group.
  84. In the event of any discrepancy between this version and the original IEEE and
  85. The Open Group Standard, the original IEEE and The Open Group Standard
  86. is the referee document. The original Standard can be obtained online at
  87. http://www.opengroup.org/unix/online.html .
  88. .PP
  89. Any typographical or formatting errors that appear
  90. in this page are most likely
  91. to have been introduced during the conversion of the source files to
  92. man page format. To report such errors, see
  93. https://www.kernel.org/doc/man-pages/reporting_bugs.html .