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

killpg.3p (2646B)


  1. '\" et
  2. .TH KILLPG "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. killpg
  12. \(em send a signal to a process group
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <signal.h>
  17. .P
  18. int killpg(pid_t \fIpgrp\fP, int \fIsig\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIkillpg\fR()
  23. function shall send the signal specified by
  24. .IR sig
  25. to the process group specified by
  26. .IR pgrp .
  27. .P
  28. If
  29. .IR pgrp
  30. is greater than 1, \fIkillpg\fP(\fIpgrp\fP,\ \fIsig\fR) shall be
  31. equivalent to \fIkill\fP(\-\fIpgrp\fP,\ \fIsig\fR). If
  32. .IR pgrp
  33. is less than or equal to 1, the behavior of
  34. \fIkillpg\fR()
  35. is undefined.
  36. .SH "RETURN VALUE"
  37. Refer to
  38. .IR "\fIkill\fR\^(\|)".
  39. .SH ERRORS
  40. Refer to
  41. .IR "\fIkill\fR\^(\|)".
  42. .LP
  43. .IR "The following sections are informative."
  44. .SH EXAMPLES
  45. .SS "Sending a Signal to All Other Members of a Process Group"
  46. .P
  47. The following example shows how the calling process could send a signal
  48. to all other members of its process group. To prevent itself from
  49. receiving the signal it first makes itself immune to the signal by
  50. ignoring it.
  51. .sp
  52. .RS 4
  53. .nf
  54. #include <signal.h>
  55. #include <unistd.h>
  56. \&...
  57. if (signal(SIGUSR1, SIG_IGN) == SIG_ERR)
  58. /* Handle error */;
  59. .P
  60. if (killpg(getpgrp(), SIGUSR1) == -1)
  61. /* Handle error */;"
  62. .fi
  63. .P
  64. .RE
  65. .SH "APPLICATION USAGE"
  66. None.
  67. .SH RATIONALE
  68. None.
  69. .SH "FUTURE DIRECTIONS"
  70. None.
  71. .SH "SEE ALSO"
  72. .IR "\fIgetpgid\fR\^(\|)",
  73. .IR "\fIgetpid\fR\^(\|)",
  74. .IR "\fIkill\fR\^(\|)",
  75. .IR "\fIraise\fR\^(\|)"
  76. .P
  77. The Base Definitions volume of POSIX.1\(hy2017,
  78. .IR "\fB<signal.h>\fP"
  79. .\"
  80. .SH COPYRIGHT
  81. Portions of this text are reprinted and reproduced in electronic form
  82. from IEEE Std 1003.1-2017, Standard for Information Technology
  83. -- Portable Operating System Interface (POSIX), The Open Group Base
  84. Specifications Issue 7, 2018 Edition,
  85. Copyright (C) 2018 by the Institute of
  86. Electrical and Electronics Engineers, Inc and The Open Group.
  87. In the event of any discrepancy between this version and the original IEEE and
  88. The Open Group Standard, the original IEEE and The Open Group Standard
  89. is the referee document. The original Standard can be obtained online at
  90. http://www.opengroup.org/unix/online.html .
  91. .PP
  92. Any typographical or formatting errors that appear
  93. in this page are most likely
  94. to have been introduced during the conversion of the source files to
  95. man page format. To report such errors, see
  96. https://www.kernel.org/doc/man-pages/reporting_bugs.html .