HylaFAX The world's most advanced open source fax server

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

Re: [hylafax-users] faxaddmodem won't see the modem

On Wed, Apr 04, 2001 at 10:14:36AM +0200, Eric Veldhuyzen wrote:
> I am trying to figure out what is going on here right now. Im am not
> sure what is happening, but the file $OUT doesn't contain anything,
> it's an empty file. And right now I am wondering if anything is send
> to the modem at all, it looks like nothing is sent to the modem, which
> would explain why there isn't coming any answer either. But debugging
> someone elses code is not quite easy, and bourne shell code isn't really
> my favorite so I might be wrong.

Ok, I think I know what's going on. In the OnDev function some command
(cat -u) is put in the background to capture any output coming from
the modem. Problem is that this command does not wait for anything,
it just outputs anything that happens to be there (which is nothing),
and exits. So all the output that would be generated on this device by
any command executed after the OnDev function is lost. The attempt to
kill this process after all the data is sent to the modem also fails,
because the process is allready gone. But this is hidden quite nicely
by redirecting any output that SendToModem might produce to /dev/null.

Just wondering, what is the -u option to 'cat' supposed to be doing?
My manual page tells me:

       -u     (ignored)

Probably not what the original programmer of the script intended.

#!perl #                       Life ain't fair, but root passwords help.
# Eric Veldhuyzen                              eric@terra.telemediair.nl
$!=$;=$_+(++$_);($:,$~,$/,$^,$*,$@)=$!=~                   # Perl Monger
/.(.)...(.)(.)....(.)..(.)..(.)/;`$^$~$/$: $^$*$@$~ $_>&$;`

____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null

Project hosted by iFAX Solutions