Yeah... ;-)

Gary

On Thu, Jun 20, 2024, 9:49 AM Mark Thomas <ma...@apache.org> wrote:

> On 20/06/2024 14:31, Gary Gregory wrote:
> > Maybe unrelated but in the same file:
> >
> >              int  timeout     = SO_STOPTIMEOUT;
> >              if (timeout) {
> >                  int i;
> >                  for (i = 0; i < timeout; i++) {
> >                      rv = apxServiceCheckStop(hService);
> >                      apxLogWrite(APXLOG_MARK_DEBUG "apxServiceCheck
> > returns %d.", rv);
> >                      if (rv)
> >                          break;
> >                  }
> >              }
> >
> > How does using the timeout value make sense in a loop like that?
>
> Look at the documentation for the apxServiceCheckStop method.
>
> Mark
>
> >
> > Gary
> >
> > On Thu, Jun 20, 2024 at 9:23 AM <ma...@apache.org> wrote:
> >>
> >> This is an automated email from the ASF dual-hosted git repository.
> >>
> >> markt pushed a commit to branch master
> >> in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
> >>
> >>
> >> The following commit(s) were added to refs/heads/master by this push:
> >>       new a343dd4  tab -> 8 spaces, fix indent
> >> a343dd4 is described below
> >>
> >> commit a343dd4be0aea8c1352b557e73ab61acbfeca5a0
> >> Author: Mark Thomas <ma...@apache.org>
> >> AuthorDate: Thu Jun 20 14:21:27 2024 +0100
> >>
> >>      tab -> 8 spaces, fix indent
> >> ---
> >>   src/native/windows/apps/prunsrv/prunsrv.c | 8 ++++----
> >>   1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/src/native/windows/apps/prunsrv/prunsrv.c
> b/src/native/windows/apps/prunsrv/prunsrv.c
> >> index 92ab69f..a30417c 100644
> >> --- a/src/native/windows/apps/prunsrv/prunsrv.c
> >> +++ b/src/native/windows/apps/prunsrv/prunsrv.c
> >> @@ -1839,15 +1839,15 @@ void WINAPI serviceMain(DWORD argc, LPTSTR
> *argv)
> >>
> >>           if (SO_STOPTIMEOUT) {
> >>               /* we have a stop timeout */
> >> -           do {
> >> +            do {
> >>                   /* wait 2 seconds */
> >>                   apxHandleWait(gWorker, 2000, FALSE);
> >>               } while (!_exe_shutdown);
> >>               apxLogWrite(APXLOG_MARK_DEBUG "waiting %d sec...
> shutdown: %d", SO_STOPTIMEOUT, _exe_shutdown);
> >>               apxHandleWait(gWorker, SO_STOPTIMEOUT*1000, FALSE);
> >> -       } else {
> >> -             apxHandleWait(gWorker, INFINITE, FALSE);
> >> -       }
> >> +        } else {
> >> +            apxHandleWait(gWorker, INFINITE, FALSE);
> >> +        }
> >>           apxLogWrite(APXLOG_MARK_DEBUG "Worker finished.");
> >>       }
> >>       else {
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> > For additional commands, e-mail: dev-h...@commons.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>

Reply via email to