From: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
---|---|
To: | pgadmin-support(at)postgresql(dot)org |
Subject: | PgAgent - return code on batch step on Windows |
Date: | 2010-11-22 12:06:17 |
Message-ID: | AANLkTi=wQkspqBUuU4WJZF2w2iFgcN-uu+qy9wgrLknu@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Hi pgadmin team.
I got a problem with PgAgent on Windows :
When I create a batch step, the status is always set to succeed, even if the
batch doesn't work.
I found this in the source code (job.cpp) :
#ifdef __WIN32__
// The Windows way
HANDLE h_script;
DWORD dwRead;
char chBuf[4098];
h_script = win32_popen_r(filename.wc_str());
[...]
CloseHandle(h_script);
*rc=1;*
#else
// The *nix way.
[...]
* rc=pclose(fp_script);
rc = (unsigned char)(rc >> 8); // The exit code is in the top 8 bits
rc = (signed char)rc;
*
the return code seems to be always true on windows platform, as the
CloseHandle return code is not used ?
Hope that'll help.
Thank you.
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2010-11-22 12:59:29 | Re: PgAgent - return code on batch step on Windows |
Previous Message | TAKATSUKA Haruka | 2010-11-22 06:38:19 | "Multiple statements are an issue with pgPool-II in its replication mode" again |