Skip site navigation (1) Skip section navigation (2)

pltcl - cannot create 'normal' interpreter - Tcl_CreateSlave() fails - A solution

From: Patrick Samson <p_samson(at)yahoo(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: pltcl - cannot create 'normal' interpreter - Tcl_CreateSlave() fails - A solution
Date: 2004-01-14 09:40:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-patches
This proposed patch is related to:

Add a call to Tcl_FindExecutable() in
pltcl.c - pltcl_init_all(),
just before the call to Tcl_CreateInterp().

It should be called with argv[0] as argument, but I
don't know how to get this piece of information for
pltcl.dll. Anyway, for Windows, it is unused
(see win/tclWinFile.c - TclpFindExecutable()). Just a
value != NULL is OK, so I used an empty string.

[Jan Wieck, I'm only interested in cygwin platform.
I suggest you investigate deeper to make this
"workaround" cleaner, in order to be also compatible
with pure Unix platforms.]

Without this call, and with only the setting of the
TCL_LIBRARY environment variable, Tcl_CreateSlave()
seems to fail somewhere else, with this message:
server closed the connection unexpectedly
   This probably means the server terminated
   before or while processing the request.
The connection to the server was lost.
 Attempting reset: Succeeded.
I didn't spend time on this issue, just added the

My proposed patch generated with:
 $ diff -u pltcl.orig pltcl.c
is attached.

Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Attachment: diff_pltcl.txt
Description: text/plain (1.6 KB)


pgsql-patches by date

Next:From: Ludek FinstrleDate: 2004-01-14 12:02:43
Subject: WIN32 psql Ctrl+C support
Previous:From: Bruce MomjianDate: 2004-01-13 01:31:18
Subject: ecpg test

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group