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

Re: [leafnode-list] New to leatnode, need a bit of help.

Ron 'The InSaNe One' Rosson wrote:
> Oisin,
>   FreeBSD does not have an inittab. It probably has that function

Uh-oh, that's a small problem. 
The next version will be able to get that function from crontab
by having a lock-file that will prevent two copies of it from running. 
I'll do that ASAP.  In the meantime, you can run it detached (see man 
nohup) but you won't have it autostart in case of failure. 

>  What do you consider linuxism in the

Hmm.  I had a quick look at the code this afternoon at work and posted 
an answer to that.  I guess it bounced 'cause I'm "from" the official 
work email address.  <sigh>

Linux uses a special filesystem mounted at /proc.  My first method of 
finding out if news was being read was to look here to see if a newsreader 
was running.  You don't need that test anyway, it's duplicated with better 
code that was added in just before I posted it on the web. 

Find the line near the bottom: 
   if(  ShouldCheck(CYCLE_READ) && (timeUserFound > (time(0) - 30))  ){
change that line to:
   if( 0 ){
and you should be OK.  The compiler will probably issue a warning about
the code being unreachable.  I'll post a real fix along with the lock 
so you can run from crontab. 

Just in case it still crashes, compile it for debug with this command: 
    g++ -g -o freshnews freshnews.cc
If it crashes again, gdb will be able to show the line that caused the 
fault.  When you load it into gdb, give the command "info stack", that 
will tell what part of the line is executing. 

Oisin  "Curly++"  Curtin                            ocurtin@xxxxxxxxxxxx
Surface Liaison, Minetown Digger                           Send no SPAM.

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list