HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Faxprinter in Linux



Aidan Van Dyk wrote:
> 
> On 29 Oct, Torbjörn Gard wrote:
> > I am trying to run sendfax as part of a input filter (printcap
> > entry if) and
> > using printcap entry af to pass on some parameters to the filter.
> >
> > I get "Error creating cover sheet".
> >
> > The problem apparently only occurs when sendfax starts faxcover
> > in the context
> > of lpd. Why it fails is beyond me.
> 
> This sounds like the same problem as the "sendfax from cron".  See the
> thread:
> Subject: flexfax: Re: running faxcover or sendfax from crontab SOLVED!!!
> Date: Thu, 22 Oct 1998 15:49:45 +0000
> 
> It will probably fix your problem.

It did! Thank you Aidan for pointing this out. And thanks to Yves
for solving
the original problem in the context of cron.

This is my solution (as I have problems compiling hylafax on my
present
Slackware system)

sendfax wrapping program:

/*
 * This program starts sendfax with default handling of signal
SIGCHLD.
 * The reason is that lpd (and cron) sets this signal to be
ignored
 * which makes sendfax fail when creating faxcover.
 *
 * Torbjörn Gard, Elektrondata AB, 981102
 */

#include <signal.h>
#include <stdio.h>
#include <errno.h>

#define SENDFAX         "/usr/local/bin/sendfax"

main( argc, argv )
int argc;
char **argv;
{
        signal( SIGCHLD, SIG_DFL );
        execv( SENDFAX, argv );
        fprintf(stderr, "%s: %s\n", SENDFAX, strerror(errno) );

        exit( 0 );
}
~
-- 
Torbjörn Gard             Linux :-)        Tel +46 31 12 53 82
Elektrondata AB                            Fax +46 31 42 53 51
Järntorget 2              mailto:torbjorn.gard@elektrondata.se
S-413 04 Göteborg Sweden           http://www.elektrondata.se/




Project hosted by iFAX Solutions