[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: depend take 2
From: |
Rory Toma |
Subject: |
Re: depend take 2 |
Date: |
17 Dec 2002 14:01:18 -0800 |
>
> Sorry, I should have elaborate more instead of throwing it out like
> that; Well the first thing I noticed was the 1 cycle wait to start a
> dependant process. I know you mentioned something about this before
> but at the time I wasn't thinking much about it, that is, until now
> when I have tried it now for myself :) I have short of manages to fix
> the problem (I think?) with this code which is a bit faster in
> control.c:atomic_control_process:
>
> if(is(action, "start")) {
> ASSERT(p->start);
> if(! is_process_running(p)) {
> int max_tries= 10;
> log("%s: (%s) %s\n", action, p->name, p->start->arg[0]);
> spawn(p, p->start);
> p->visited= TRUE;
> while(max_tries--) {
> if(is_process_running(p))
> break;
> sleep(1);
> }
> }
This will probably work fine, except maybe instead of a sleep(1), we
want to make it sleep(Run.polltime/max_tries), that way if you have
slow-starting processes, you can tune it with setting the poll time.
> Another problem I found was that if I run 'monit start' from the
> console and both processes is up and running, monit for some reason
> kills one. This is what I have found so far and I just want to see if
> it's easily fixable :-) Agree?
I did not know about this one. I'll test it out.
In the meantime, I'll go ahead and add the above code in.
--
Rory Toma address@hidden
VP of Run Level 5 http://www.trs80.net
Digeo Digital http://www.digeo.com
signature.asc
Description: This is a digitally signed message part
- depend take 2, Jan-Henrik Haukeland, 2002/12/17
- Re: depend take 2, Rory Toma, 2002/12/17
- Re: depend take 2, Jan-Henrik Haukeland, 2002/12/17
- Re: depend take 2,
Rory Toma <=
- Re: depend take 2, Jan-Henrik Haukeland, 2002/12/17
- Re: depend take 2, Rory Toma, 2002/12/17
- RE: depend take 2, Jan-Henrik Haukeland, 2002/12/17
- RE: depend take 2, Rory Toma, 2002/12/17
- Re: depend take 2, Martin Pala, 2002/12/18
- Re: depend take 2, Martin Pala, 2002/12/18
- Re: depend take 2, Martin Pala, 2002/12/18
- Re: depend take 2, rory, 2002/12/18
Re: depend take 2, Martin Pala, 2002/12/17