Back Midas Rome Roody Rootana
  Midas DAQ System  Not logged in ELOG logo
Entry  20 Nov 2003, Konstantin Olchanski, , midas timeout wraparound 
    Reply  20 Nov 2003, Konstantin Olchanski, , cannot shutdown defunct clients 
       Reply  20 Nov 2003, Stefan Ritt, , cannot shutdown defunct clients 
          Reply  20 Nov 2003, Konstantin Olchanski, , cannot shutdown defunct clients 
             Reply  20 Nov 2003, Stefan Ritt, , cannot shutdown defunct clients 
             Reply  20 Nov 2003, Renee Poutissou, , cannot shutdown defunct clients 
                Reply  24 Nov 2003, Stefan Ritt, , cannot shutdown defunct clients 
Message ID: 97     Entry time: 24 Nov 2003     In reply to: 96
Author: Stefan Ritt 
Topic:  
Subject: cannot shutdown defunct clients 
> But there is one problem with "cleanup". It has a hardwired timeout of
> 2 seconds.  This is a problem for tasks like lazylogger which set a timeout
> of 60 seconds when moving the tape. So BEWARE, if you issue the "cleanup"
> command, it might kill some clients who have setup their timeout to longer
> than 2 seconds. 
> 
> I have asked Stefan to change this before. He said that, to be effective,
> the timeout value used for "cleanup" has to be rather short. 
> One possibility, would be to allow for a user entered "cleanup" timeout.
> The default could stay at 2 seconds. 

I changed the behaviour of cleanup by adding an extra parameter 
ignore_timeout to cm_cleanup(). Now, in ODBEdit, a "clanup" obeys the 
timeout set by the clients. The problem with that is if the logger crashes 
for example, and it's timeout is set o 5 min., it cannot be clean-up'ed any 
more for the next five minutes, and therefor not be restarted wasting 
precious beam time. That's why I hard-wired originally the "cleanup" timout 
to 2 sec. Now I added a flag "-f" to the ODBEdit cleanup command which works 
in the old fashion with a 2 sec. timeout. So a "cleanup" alone won't kill a 
looger which currently rewinds a tape or so, but a "cleanup -f" does.

I also changed internal timeouts from INT to DWORD, which should fix the 
problem Konstantin reported recently (re-starting an experiment after 
several weeks). New changes are commited, but I only did basic tests. So 
please try the new code and tell me if there is any problem.

- Stefan
ELOG V3.1.4-2e1708b5