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

siginterrupt.3p (2724B)


  1. '\" et
  2. .TH SIGINTERRUPT "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. siginterrupt
  12. \(em allow signals to interrupt functions
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <signal.h>
  17. .P
  18. int siginterrupt(int \fIsig\fP, int \fIflag\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIsiginterrupt\fR()
  23. function shall change the restart behavior when a function is
  24. interrupted by the specified signal. The function
  25. \fIsiginterrupt\fP(\fIsig\fP, \fIflag\fP) has an effect as if
  26. implemented as:
  27. .sp
  28. .RS 4
  29. .nf
  30. int siginterrupt(int sig, int flag) {
  31. int ret;
  32. struct sigaction act;
  33. .P
  34. (void) sigaction(sig, NULL, &act);
  35. if (flag)
  36. act.sa_flags &= \(tiSA_RESTART;
  37. else
  38. act.sa_flags |= SA_RESTART;
  39. ret = sigaction(sig, &act, NULL);
  40. return ret;
  41. }
  42. .fi
  43. .P
  44. .RE
  45. .SH "RETURN VALUE"
  46. Upon successful completion,
  47. \fIsiginterrupt\fR()
  48. shall return 0; otherwise, \-1 shall be returned and
  49. .IR errno
  50. set to indicate the error.
  51. .SH ERRORS
  52. The
  53. \fIsiginterrupt\fR()
  54. function shall fail if:
  55. .TP
  56. .BR EINVAL
  57. The
  58. .IR sig
  59. argument is not a valid signal number.
  60. .LP
  61. .IR "The following sections are informative."
  62. .SH EXAMPLES
  63. None.
  64. .SH "APPLICATION USAGE"
  65. The
  66. \fIsiginterrupt\fR()
  67. function supports programs written to historical system interfaces.
  68. Applications should use the
  69. \fIsigaction\fR()
  70. with the SA_RESTART flag instead of the obsolescent
  71. \fIsiginterrupt\fR()
  72. function.
  73. .SH RATIONALE
  74. None.
  75. .SH "FUTURE DIRECTIONS"
  76. None.
  77. .SH "SEE ALSO"
  78. .IR "Section 2.4" ", " "Signal Concepts",
  79. .IR "\fIsigaction\fR\^(\|)"
  80. .P
  81. The Base Definitions volume of POSIX.1\(hy2017,
  82. .IR "\fB<signal.h>\fP"
  83. .\"
  84. .SH COPYRIGHT
  85. Portions of this text are reprinted and reproduced in electronic form
  86. from IEEE Std 1003.1-2017, Standard for Information Technology
  87. -- Portable Operating System Interface (POSIX), The Open Group Base
  88. Specifications Issue 7, 2018 Edition,
  89. Copyright (C) 2018 by the Institute of
  90. Electrical and Electronics Engineers, Inc and The Open Group.
  91. In the event of any discrepancy between this version and the original IEEE and
  92. The Open Group Standard, the original IEEE and The Open Group Standard
  93. is the referee document. The original Standard can be obtained online at
  94. http://www.opengroup.org/unix/online.html .
  95. .PP
  96. Any typographical or formatting errors that appear
  97. in this page are most likely
  98. to have been introduced during the conversion of the source files to
  99. man page format. To report such errors, see
  100. https://www.kernel.org/doc/man-pages/reporting_bugs.html .