OSSP CVS Repository

ossp - Difference in ossp-pkg/l2/l2.pod versions 1.6 and 1.7
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/l2/l2.pod 1.6 -> 1.7

--- l2.pod       2001/09/14 19:22:38     1.6
+++ l2.pod       2001/09/20 16:26:56     1.7
@@ -102,6 +102,58 @@
 
 =back
 
+=head2 Pipe Output Channel Handler (l2_handler_pipe)
+
+The Pipe output channel handler C<l2_handler_pipe> sends the incoming
+message to the standard input of a chosen command, passed to the l2
+library as a parameter when calling l2_configure.
+
+Any command that operates on the standard input (c language descriptor
+stdin) can be used, but attention is advised due to the wide
+variety of commands and their particular exit behaviours.
+
+Attention! Commands that exit on their own and with a success return value will
+not be restarted, however those returning with non-zero exit codes will be
+restarted. L2 reopens closed pipe channels due to faulted command processes in
+this way. Should such a reconnection be required after a command's successful
+self-termination, l2_channel_open() may be called again on the same pipe channel
+pointer previously used. Stream logging will then write to the pipe channel
+handler, which will forward the log messages to the given command as always. To
+find out if a pipe channel has closed due to the behaviour of its command
+process, the l2_channel_write() operation may be called on it with a non-NULL
+message parameter, and 0 as the buffsize parameter. The return result will be
+L2_OK if the channel is open. Using the C language, such a check might look
+like:
+
+TODO NOTE FROM MICHAEL: This info will change once the pipe channel handler is
+redesigned to allow for proper process termination, signal handling of such
+processes, and subsequent channel closing!!!!!!!!!!!
+
+    if (l2_channel_write(pPipechannel, L2_LEVEL_NOTICE, "", 0) != L2_OK)
+        if (l2_channel_open(pPipechannel) != L2_OK)
+            exit(1); /* failure */
+
+The command passed to the pipe channel handler may also be stopped while still
+using a L2 stream log. If a command process is stopped no action is taken
+until further logging occurs. As soon as the pipe channel handler receives a
+message due to a l2_stream_log operation, it will attempt to restart the
+stopped command process and write to its standard input. If the effort to
+restart the command process fails then the command process is considered
+dead, and L2 will terminate the process and close the channel. A
+l2_channel_open() will then reopen the pipe channel using configuration
+information previously entered with l2_channel_configure().
+
+It provides the following channel parameters:
+
+=over 4
+
+=item B<command> (optional, C<char *>)
+
+L2 will execute the command at this user-provided path, and pipe messages to
+its standard input when l2_stream_log operations are called.
+
+=back
+
 =head2 SMTP Output Channel Handler (l2_handler_smtp)
 
 The SMTP output channel handler C<l2_handler_smtp> sends the incoming

CVSTrac 2.0.1