Wydawca (split by node):   Section:   Chapter:FastBack: overview   Up: overview   FastForward: starting   Contents: Table of ContentsIndex: Concept Index

2.1 Operation Modes

The program has two operation modes: ‘cron mode’ and ‘daemon mode’.

In cron mode, wydawca runs in foreground and exits when it is done with processing all required spools. By default it processes all configured spools, unless a subset of them is specified in the command line. This is called cron mode, because this is the usual way for wydawca to be used as a cron job.

In daemon mode, wydawca detaches itself from the controlling terminal and runs in the background. It watches for the incoming uploads using one or both of the following methods.

On modern GNU/Linux systems wydawca uses inotify API (see monitoring file system events in inotify man page), which enables it to react on each upload immediately after a complete triplet is uploaded and to clean up unfinished or incomplete uploads. This is a preferred mode of operation.

On other systems, the daemon can be configured to listen on a socket for upload notifications. This method can also be used together with inotify, should the need be. This feature uses the TCPMUX protocol4 and operates as follows:

After establishing connection, the remote party (the client) sends the spool tag followed by a CRLF pair. The server scans its configuration for a spool that has the requested ID. If no such spool is found, the server replies with the string ‘- Unknown service name’, followed by a CRLF pair and closes the connection.

If a matching spool is found, the server replies with ‘+’ acknowledgment, immediately followed by an optional message of explanation, and terminated with a CRLF. Upon receiving this acknowledgment, the client sends the login name of the user who did the upload5. The following sample transaction illustrates this:

C: stable
S: +OK. URL ftp://ftp.domain.net
C: smith

When the user name is received, the server schedules a job for processing all triplets in the given spool.

Footnotes

(4)

RFC 1078.

(5)

The user name requirement is retained for backward compatibility. In fact, it is not used, so that any word can be sent instead.

Wydawca (split by node):   Section:   Chapter:FastBack: overview   Up: overview   FastForward: starting   Contents: Table of ContentsIndex: Concept Index