Re: PgAgent 3.3.0 batch scripts on windows always get status failed - Mailing list pgadmin-support

From Bastiaan Olij
Subject Re: PgAgent 3.3.0 batch scripts on windows always get status failed
Date
Msg-id 511042F1.9090002@basenlily.me
Whole thread Raw
In response to Re: PgAgent 3.3.0 batch scripts on windows always get status failed  (Dave Page <dpage@pgadmin.org>)
Responses Re: PgAgent 3.3.0 batch scripts on windows always get status failed
List pgadmin-support
Hi Dave,

I don't think that will work, yes it will get the proper rc value but it
still leaves succeeded set to false. It needs inclusion of a check to
see if rc==0 and if so set succeeded to true provided that a successful
script indeed returns an error level of 0 (which I think it should).

And yes, if you could send me a new binary then we are able to test this
swiftly. We do currently use the enterprisedb distributable so I'm
taking the assumption I'll be able to just drop the new .exe in place of
the old for this.

Kindest Regards,

Bastiaan Olij

> This seems to be a previously reported issue that slipped through the
> net due to lack of feedback. The patch I proposed looks like:
>
> raptor:pgagent dpage$ git diff
> diff --git a/job.cpp b/job.cpp
> index a9c0c1b..937bc9c 100644
> --- a/job.cpp
> +++ b/job.cpp
> @@ -264,8 +264,8 @@ int Job::Execute()
>                                 }
>
>
> +                               GetExitCodeProcess(h_script, (LPDWORD)&rc);
>                                 CloseHandle(h_script);
> -                               rc = 1;
>
>  #else
>                                 // The *nix way.
>
> Are you in a position to test it if I build a binary for Windows?
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>




pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: PgAgent 3.3.0 batch scripts on windows always get status failed
Next
From: ldrlj1
Date:
Subject: Modifying user in PGAdmin 1.16 sets Account Expiration