Robert Haas wrote:
> >> This isn't really a "fix" for the bug in the sense that the nicest
> >> thing of all would be to prevent the child from exiting abnormally in
> >> the first place. ?But it's far from clear that we can control that.
> >
> > This URL has some interesting details on our problem:
> >
> > ? ? ? 
> > ?http://stackoverflow.com/questions/139090/getexitcodeprocess-returns-128
> >
> > Error code 128 is identified as:
> >
> > ? ? ? ?error code 128 RROR_WAIT_NO_CHILDREN 128 0x80 There are no child
> > ? ? ? ?processes to wait for
> >
> > and the suggested cause is:
> >
> > ? ? ? ?Have a look at Desktop Heap memory.
> >
> > ? ? ? ?Essentially the desktop heap issue comes down to exhausted resources 
> > (eg
> > ? ? ? ?starting too many processes). When your app runs out of these 
> > resources,
> > ? ? ? ?one of the symptoms is that you won't be able to start a new process,
> > ? ? ? ?and the call to CreateProcess will fail with code 128.
> >
> > My guess is that at the time of CreateProcess(), there is enough desktop
> > heap memory, but at some later time, perhaps caused by a logout, there
> > isn't and the process never gets started.
> 
> Yeah, that seems very plausible, although exactly how to verify I don't know.

And here is confirmation from the Microsoft web site:

        http://support.microsoft.com/kb/156484

        Cmd.exe, Perl.exe, or other console-mode applications may fail to
        initialize properly and terminate prematurely when launched by a service
        using the CreateProcess() or CreateProcessAsUser() APIs. The calling
        process has no way of knowing that the launched console-mode application
        has terminated prematurely.
        
        In some instances, calling GetExitCode() against the failed process
        indicates the following exit code:
        128L ERROR_WAIT_NO_CHILDREN - There are no child processes to wait for. 
        ...
        Internet Information Server (IIS) may exhibit this problem
        intermittently when processing CGI or Perl scripts. In this case the
        browser returns the following error when executing CGI scripts:

-- 
  Bruce Momjian  <br...@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to