home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 400-499 / ff473.lzh / CNewsSrc / cnews_src.lzh / notebook / ctlmsg < prev    next >
Text File  |  1990-01-11  |  2KB  |  108 lines

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