EXIT STATUS OF MGETTY

"Robert J. Brown" (rj@eli.elilabs.com)
Tue, 16 Sep 1997 20:47:24 +0200


>>>>> "Gert" == Gert Doering <gert@greenie.muc.de> writes:

 Gert> Hi, Robert J. Brown wrote:
 >> Without modifying faxspool and faxrunq, you would have to pipe
 >> the stdout of these scripts thru a parser to determine if the
 >> succeded or not. This is not usually as bad as it sounds. Of
 >> course, exit codes would be nice. :-)

 Gert> For *faxspool*, there is a meaningful way to define
 Gert> "success" or "failure" -- and thus, faxspool uses proper
 Gert> exit codes.

 Gert> Only for faxrunq, it's unclear what "failure" would mean
 Gert> ("all faxes failed"? "one out of the queue failed"? "more
 Gert> than 50 per cent failed"?), thus it will only return a
 Gert> non-zero exit code on invocation or system fatal errors.

Sorry... Brain damage on my part. I did not even think about those 2
particular programs, but just wrote a general way around the general
problem. :-)

The solution for faxrunq is to have a .forward file in ~faxmaster/
that actually reads and parses the email the daemon sends to determine
success of failure for each job. Of course, you couldn't actually
wait for this to occur, as it takes an indeterminate, but usually
rather long, time.

I think the original author was abusing faxrunq by invoking it
manually instead of via a crontab entry, and wanted to know whether a
single fax was sent or not. Of course, this eliminates any ability to
retry on a busy number the next cron activation, since there is none.

In other words: faxrunq -- use as directed.

-- 
-------- "And there came a writing to him from Elijah" [2Ch 21:12] --------
Robert Jay Brown III rj@eli.elilabs.com http://www.elilabs.com 1 847 705-0424
Elijah Laboratories Inc.; 37 South Greenwood Avenue; Palatine, IL 60067-6328
----- M o d e l i n g t h e M e t h o d s o f t h e M i n d ------
.