Hylafax Mailing List Archives

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

Re: Sendfax doesn't work when in startup script



Rob Embry wrote:
> 
> The problem:  When I start the monitor program manually from the command
> line logged in as root ("/usr/bin/perl monitor_pgm &"), everything works OK.
> When the monitor program is started from rc.local at system start after a
> reboot, and after hfaxd starts, the sendfax command in faxit fails and
> returns a blank error messages.
> 
> I have tried tweaking every permission and parameter I am aware of to no
> avail.  Clearly the monitor process and its descendants are not getting
> something they need when run from startup.
> 
> Any ideas?

May be the same problem I had: sendfax ignoring SIGCHLD from (maybe
this
time also) faxcover. The problem occured when starting sendfax in the
context of lpd. 


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/



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services