-------- Hello Joerg, and long time no seeing you, Ilya. Ilya> Without further explanation I hardly think this is a solution. The Ilya> real problem is that putenv() of Term::ReadLine::Gnu is mentioning a Ilya> wrong malloc() [though I have no idea how this might have happened - Ilya> but it does, at least on Solaris 2.7]. I agree with you. Something wrong around malloc(). But I feel strange by seeing the patch. >> --- perl5.005_02/util.c.orig Wed Nov 17 00:21:06 1999 >> +++ perl5.005_02/util.c Wed Nov 17 00:21:50 1999 >> @@ -1413,12 +1413,14 @@ >> my_setenv(char *nam, char *val) >> { >> register I32 i=setenv_getix(nam); /* where does it go? */ >> + static int copyenv = 1; >> >> - if (environ == PL_origenviron) { /* need we copy environment? */ >> + if (copyenv) { /* need we copy environment? */ >> I32 j; >> I32 max; >> char **tmpenv; >> >> + copyenv = 0; >> /*SUPPRESS 530*/ >> for (max = i; environ[max]; max++) ; >> New(901,tmpenv, max+2, char*); The orignal code assumes >> - if (environ == PL_origenviron) { /* need we copy environment? */ is true, only when my_setenv() is called at the first time only. And Joerg's patch should work as same as original code. I do not understand why the patch works. Thank you. -------- Hiroo Hayashi