Re: PgAgent 3.3.0 batch scripts on windows always get status failed

From: Bastiaan Olij <bastiaan(at)basenlily(dot)me>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-support(at)postgresql(dot)org
Subject: Re: PgAgent 3.3.0 batch scripts on windows always get status failed
Date: 2013-02-04 23:23:29
Message-ID: 511042F1.9090002@basenlily.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
>
>

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message ldrlj1 2013-02-05 18:49:58 Modifying user in PGAdmin 1.16 sets Account Expiration
Previous Message Dan Halbert 2013-02-04 15:54:46 Re: 1.16.1: many operations cause display tree to collapse