"Sofer, Yuval" <Yuval_Sofer(at)bmc(dot)com> writes:
> code is attached below - c and h file , as well as the sql to create the function in postgres repository.
Hm ... no obvious way that that could cause an exit(0). I didn't inspect
it closely for garden-variety bugs, but if it were crashing in an ordinary
way the symptoms would be different from what you're reporting.
There's always the catch-all explanation for random weirdness on Windows
machines: do you have any antivirus software installed? If so, does
removing it make the problem go away?
regards, tom lane