home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / doc / ctlmsg < prev    next >
Text File  |  1992-02-16  |  2KB  |  116 lines

  1. .Ch "Control Message Implementation in C News"
  2. .Ix implementation "control messages"
  3. .Ix "control messages implementation"
  4. .SH
  5. Introduction
  6. .PP
  7. Netnews
  8. .I "control messages"
  9. are ordinary-looking netnews articles which contain the
  10. special header
  11. .B "Control:" .
  12. .Ix Control:
  13. Such articles are filed in the pseudo-newsgroup
  14. .I control
  15. and cause related actions by the local news system,
  16. such as mailing a file to the poster of the control message.
  17. .SH
  18. Built-ins
  19. .PP
  20. .B ihave ,
  21. .Ix "control messages" ihave
  22. .Ix "control messages" sendme
  23. .B sendme ,
  24. and
  25. .B cancel
  26. .Ix "control messages" cancel
  27. are handled internally by
  28. .I relaynews ,
  29. .Ix relaynews
  30. because processes cannot share open
  31. .I dbm (3)
  32. databases,
  33. there is no standard way to close them,
  34. and
  35. these control messages read or write the
  36. .I history
  37. .Ix history
  38. .Ix files history
  39. files,
  40. including the
  41. .I dbm
  42. files.
  43. .I Ihave
  44. and
  45. .I sendme
  46. are also permitted to have message-id arguments containing
  47. .B <
  48. and
  49. .B > ,
  50. both of which are rejected by
  51. .I relaynews
  52. in arguments to externally-implemented control messages,
  53. since they are shell metacharacters
  54. (\c
  55. .B /
  56. and
  57. .B ..
  58. are also bounced)
  59. and could be indicative of an attempt to
  60. do something nasty.
  61. .SH
  62. Normal Control Messages
  63. .PP
  64. Most control messages are implemented by
  65. .I relaynews
  66. by executing the command line following
  67. .B Control:
  68. with a search path of
  69. .I $NEWSCTL/bin:$NEWSBIN/ctl
  70. and with standard input set to
  71. the control message article.
  72. The command inherits
  73. the standard news search path
  74. and
  75. .I relaynews 's
  76. user and group ids,
  77. typically
  78. .I news ;
  79. this can be important
  80. to gain access rights to control files.
  81. The news system will be locked
  82. .Ix "news system lock"
  83. (by
  84. .I $NEWSCTL /lock)
  85. while the command runs,
  86. because
  87. this is often important
  88. for manipulating control files
  89. from the command,
  90. and
  91. because
  92. the news system is locked
  93. while
  94. .I relaynews
  95. runs.
  96. If that command returns non-zero exit status,
  97. mail is sent to
  98. .I $NEWSMASTER
  99. (usually
  100. .B usenet ).
  101. Standard output and standard error
  102. often are redirected to
  103. .I $NEWSCTL /log
  104. .Ix log
  105. .Ix files log
  106. and
  107. .I $NEWSCTL /errlog
  108. .Ix errlog
  109. .Ix files errlog
  110. respectively;
  111. invocations of
  112. .I relaynews
  113. by
  114. .I inews
  115. are exceptions.
  116.