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.

Reply via email to