postnote 790 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. .TH POSTNOTE 2
  2. .SH NAME
  3. postnote \- send a note to a process or process group
  4. .SH SYNOPSIS
  5. .B #include <u.h>
  6. .br
  7. .B #include <libc.h>
  8. .PP
  9. .nf
  10. .B
  11. int postnote(int who, int pid, char *note)
  12. .fi
  13. .SH DESCRIPTION
  14. .I Postnote
  15. sends a note to a process or process group.
  16. If
  17. .I who
  18. is
  19. .BR PNPROC ,
  20. then
  21. .I note
  22. is written to
  23. .BI /proc/ pid /note\f1.
  24. If
  25. .I who
  26. is
  27. .BI PNGROUP ,
  28. the note is delivered to the
  29. process group by writing
  30. .I note
  31. to
  32. .BI /proc/ pid /notepg\f1.
  33. For
  34. .B PNGROUP
  35. only, if the calling process is in the target group, the note is
  36. .I not
  37. delivered to that process.
  38. .PP
  39. If the write is successful, zero is returned.
  40. Otherwise \-1 is returned.
  41. .SH SOURCE
  42. .B /sys/src/libc/9sys/postnote.c
  43. .SH "SEE ALSO"
  44. .IR notify (2),
  45. .IR intro (2),
  46. .IR proc (3)
  47. .SH DIAGNOSTICS
  48. Sets
  49. .IR errstr .