You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2024/06/20 13:22:20 UTC
(commons-daemon) branch master updated: tab -> 8 spaces, fix indent
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 {
Re: (commons-daemon) branch master updated: tab -> 8 spaces, fix indent
Posted by Gary Gregory <ga...@gmail.com>.
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-unsubscribe@commons.apache.org
> > For additional commands, e-mail: dev-help@commons.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
Re: (commons-daemon) branch master updated: tab -> 8 spaces, fix indent
Posted by Mark Thomas <ma...@apache.org>.
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-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: (commons-daemon) branch master updated: tab -> 8 spaces, fix indent
Posted by Gary Gregory <ga...@gmail.com>.
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?
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-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org