zsh-workers
 help / color / mirror / code / Atom feed
* zsh does not execute skripts on AIX?
@ 1997-06-09 11:41 Marco Kattannek
  1997-06-09 17:32 ` Zoltan T. Hidvegi
  0 siblings, 1 reply; 6+ messages in thread
From: Marco Kattannek @ 1997-06-09 11:41 UTC (permalink / raw)
  To: zsh-workers


Hallo to all,
I have encountered a strange behavour of the zsh on AIX 3.2 .
The zsh (2.5 and 3.1) does not execute scripts that are passed to the
/bin/sh . The sh drops the error message:
: 0402-026 The specified data is not a valid identifier.
This happens on all RS6000 AIX 3.2 Machines of our cluster. The ksh
has no problem with that. ( sh stupidskript ) Now comes the really od
thing! When you execute the ksh with "exec ksh" and then the zsh again
with "exec zsh", everything works fine again???????
This happens with EVERY skript that has no #!/bin/... in it (is passed
to the sh I beleave) or #!/bin/sh in it. Skripts with #!/bin/ksh work
fine. The command "sh skript" does not work too, of couse.
I would be very glad if someone could help me. On all other computers
( HPs, Linux-PCs, SGI ) the skript execution works with the zsh.
The Computers are IBM RS6000 with the Power2 Processor, all with AIX 3.2
 ( 320H, 350, 370, 390, 3BT, 3CT).
If this is a known AIX bug or a FAK, I want to apologize.

      I would be very glad if someone could help me.
                                  Greetings          Marco

e-mail: marcok@tchibm3.chemie.uni-karlsruhe.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh does not execute skripts on AIX?
  1997-06-09 11:41 zsh does not execute skripts on AIX? Marco Kattannek
@ 1997-06-09 17:32 ` Zoltan T. Hidvegi
  1997-06-10 11:24   ` Marco Kattannek
  0 siblings, 1 reply; 6+ messages in thread
From: Zoltan T. Hidvegi @ 1997-06-09 17:32 UTC (permalink / raw)
  To: Marco Kattannek; +Cc: zsh-workers

> I have encountered a strange behavour of the zsh on AIX 3.2 .
> The zsh (2.5 and 3.1) does not execute scripts that are passed to the
> /bin/sh . The sh drops the error message:
> : 0402-026 The specified data is not a valid identifier.

Looks like there is some junk in the environment which confuses /bin/sh.
I've never had such problems on AIX.  Probably the program which calls zsh
put something into the environment which sh cannot handle.  Zsh just passes
this down to sh while ksh probably filters this out.

Zoltan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh does not execute skripts on AIX?
  1997-06-09 17:32 ` Zoltan T. Hidvegi
@ 1997-06-10 11:24   ` Marco Kattannek
  1997-06-13 15:54     ` Bill Pemberton
  1997-06-16  4:29     ` Zoltan Hidvegi
  0 siblings, 2 replies; 6+ messages in thread
From: Marco Kattannek @ 1997-06-10 11:24 UTC (permalink / raw)
  To: Zoltan T. Hidvegi; +Cc: zsh

According to Zoltan T. Hidvegi:
> > I have encountered a strange behavour of the zsh on AIX 3.2 .
> > The zsh (2.5 and 3.1) does not execute scripts that are passed to the
> > /bin/sh . The sh drops the error message:
> > : 0402-026 The specified data is not a valid identifier.
> 
> Looks like there is some junk in the environment which confuses /bin/sh.
> I've never had such problems on AIX.  Probably the program which calls zsh
> put something into the environment which sh cannot handle.  Zsh just passes
> this down to sh while ksh probably filters this out.
> 
> Zoltan
First of all, thank you for your advise. In the meantime I have found out,
that the PROBLEM is more complex. We use the "ssh" for remote login.
This only happens, when you use a terminal emulation (hpterm or xterm)
started with the secure shell (ssh, f.e. ssh badibm13 ;). When I explicitly
use the program "rlogin" (f.e. rlogin fineibm12 :) everything works fine????
But as I explained, when I use ssh and the zsh and I process the cycle
"exec ksh" -> "exec zsh" , then I CAN USE skripts with the zsh in a
remote terminal controled by the ssh?????????? And this is very strange,
don't you think.
Strange too is this behaviour, while invoking a shellskript with
"uglyskript13" does not work (without the ksh-zsh cycle trick), the command
". niceskript10" executes the skript??????  Does the zsh treat the skript
executing mechanisms with and without DOT different? (the skripts are of couse
executable)
I do find this behaviour very odd, but with the workaround mentioned
above I can go on using the zsh. Maybe this should be send to the secure
shell people too. Someone should find out, if this only happens with AIX 3.2.

In short: Remote terminal emulation started with the ssh and the zsh, can
          not execute a executable skript on AIX 3.2 by typing the name
          of the skript. Executing with ". skript" (DOT skript) works.
          Rlogin and zsh, or ssh and ksh works too. Executing the ksh
          (exec ksh) and then the zsh again (exec zsh), fixes the problem.
         
                                          Greetings              Marco

e-mail: marcok@tchibm3.chemie.uni-karlsruhe.de


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh does not execute skripts on AIX?
  1997-06-10 11:24   ` Marco Kattannek
@ 1997-06-13 15:54     ` Bill Pemberton
  1997-06-13 16:55       ` Marco Kattannek
  1997-06-16  4:29     ` Zoltan Hidvegi
  1 sibling, 1 reply; 6+ messages in thread
From: Bill Pemberton @ 1997-06-13 15:54 UTC (permalink / raw)
  To: Marco Kattannek; +Cc: zsh-workers

Marco Kattannek writes:
> 
> 
> In short: Remote terminal emulation started with the ssh and the zsh, can
>           not execute a executable skript on AIX 3.2 by typing the name
>           of the skript. Executing with ". skript" (DOT skript) works.
>           Rlogin and zsh, or ssh and ksh works too. Executing the ksh
>           (exec ksh) and then the zsh again (exec zsh), fixes the problem.
>          

I don't see this problem here -- I'm using ssh and zsh on many
versions of AIX (3.2.4, 3.2.5, 4.1.4, 4.1.5, 4.2, and 4.2.1).

-- 
Bill Pemberton                                 wfp5p@virginia.edu
ITC/Unix Systems                               flash@virginia.edu
University of Virginia                         uunet!virginia!wfp5p


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh does not execute skripts on AIX?
  1997-06-13 15:54     ` Bill Pemberton
@ 1997-06-13 16:55       ` Marco Kattannek
  0 siblings, 0 replies; 6+ messages in thread
From: Marco Kattannek @ 1997-06-13 16:55 UTC (permalink / raw)
  To: Bill Pemberton; +Cc: zsh

According to Bill Pemberton:
> Marco Kattannek writes:
> > 
> > 
> > In short: Remote terminal emulation started with the ssh and the zsh, can
> >           not execute a executable skript on AIX 3.2 by typing the name
> >           of the skript. Executing with ". skript" (DOT skript) works.
> >           Rlogin and zsh, or ssh and ksh works too. Executing the ksh
> >           (exec ksh) and then the zsh again (exec zsh), fixes the problem.
> >          
> 
> I don't see this problem here -- I'm using ssh and zsh on many
> versions of AIX (3.2.4, 3.2.5, 4.1.4, 4.1.5, 4.2, and 4.2.1).
It seems to be a very specific problem. When I make a remote login to
a IBM RS600 with ssh, I get this PROBLEM. I can use all our Computers
( IBM RS6000, HP735, HP770, HP780, Linux PC (PPro) ) and I get the same 
result. When I directly login on a IBM, every thing works as it schould.
When I make a ssh to another, or the same IBM , I run into this problem.
And its only on IBMs, and only when ssh and zsh come together, and I haven't
used the "cycle trick". I have tested out a lot. but I can't find out what
goes wrong. I always get this message:
: 0402-026 The specified data is not a valid identifier.
I can use "ksh 1test" and it works, or "zsh 1test", it is only the "sh" that
does not execute the script when invoked from a zsh.
I looked at the Enviroment, if something changes befor and after the "cycle
trick", but I have found nothing.
Is there a way to find out WHAT the zsh passes to the "sh" to start a 
shellscript???
I tried the same with a IBM using AIX 4.1, and -> it works .......
So it seems to be a problem with AIX 3.2.5 . Is there a patch we schould
install?

                                 Greetings             Marco

e-mail: marcok@tchibm3.chemie.uni-karlsruhe.de


> 
> -- 
> Bill Pemberton                                 wfp5p@virginia.edu
> ITC/Unix Systems                               flash@virginia.edu
> University of Virginia                         uunet!virginia!wfp5p
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: zsh does not execute skripts on AIX?
  1997-06-10 11:24   ` Marco Kattannek
  1997-06-13 15:54     ` Bill Pemberton
@ 1997-06-16  4:29     ` Zoltan Hidvegi
  1 sibling, 0 replies; 6+ messages in thread
From: Zoltan Hidvegi @ 1997-06-16  4:29 UTC (permalink / raw)
  To: Marco Kattannek; +Cc: Zsh hacking and development

> > > I have encountered a strange behavour of the zsh on AIX 3.2 .
> > > The zsh (2.5 and 3.1) does not execute scripts that are passed to the
> > > /bin/sh . The sh drops the error message:
> > > : 0402-026 The specified data is not a valid identifier.
> > 
> > Looks like there is some junk in the environment which confuses /bin/sh.
> > I've never had such problems on AIX.  Probably the program which calls zsh
> > put something into the environment which sh cannot handle.  Zsh just passes
> > this down to sh while ksh probably filters this out.

The patch below should take care of this problem.  It only adds those
variables to the new environment which are accessable via zsh parameters.
If an environment variable is multiply defined, only the second
definition is kept and the there will be only a single definition in the
new environment (this is consistent with ksh).

Zoltan


*** Src/params.c	1997/06/05 04:44:57	3.1.3.0
--- Src/params.c	1997/06/16 04:16:25
***************
*** 98,110 ****
  	old_environ = environ;
  	num_env = arrlen(old_environ);
  	environ = (char **) zalloc(sizeof(char *) * (num_env + 1));
! 	for (envp = environ, envp2 = old_environ; *envp2; envp2++)
! 	    *envp++ = ztrdup(*envp2);
! 	*envp = NULL;
  
  	/* Now incorporate environment variables we are inheriting *
  	 * into the parameter hash table.                          */
! 	for (envp = environ, envp2 = old_environ; *envp2; envp++, envp2++) {
  	    for (str = *envp2; *str && *str != '='; str++);
  	    if (*str == '=') {
  		iname = NULL;
--- 98,108 ----
  	old_environ = environ;
  	num_env = arrlen(old_environ);
  	environ = (char **) zalloc(sizeof(char *) * (num_env + 1));
! 	*environ = NULL;
  
  	/* Now incorporate environment variables we are inheriting *
  	 * into the parameter hash table.                          */
! 	for (envp = environ, envp2 = old_environ; *envp2; envp2++) {
  	    for (str = *envp2; *str && *str != '='; str++);
  	    if (*str == '=') {
  		iname = NULL;
***************
*** 113,125 ****
  		    iname = *envp2;
  		    if ((!(pm = (Param) paramtab->getnode(paramtab, iname)) ||
  			 !(pm->flags & PM_DONTIMPORT)) &&
! 			(pm = setsparam(iname, metafy(str + 1, -1, META_DUP)))) {
  			pm->flags |= PM_EXPORTED;
! 			pm->env = *envp;
  			if (pm->flags & PM_SPECIAL)
! 			    pm->env = replenv(pm->env, getsparam(iname));
! 		    } else if (pm)
! 			for (t = envp--; (t[0] = t[1]); t++);
  		}
  		*str = '=';
  	    }
--- 111,125 ----
  		    iname = *envp2;
  		    if ((!(pm = (Param) paramtab->getnode(paramtab, iname)) ||
  			 !(pm->flags & PM_DONTIMPORT)) &&
! 			(pm = setsparam(iname, metafy(str + 1, -1, META_DUP))) &&
! 			!(pm->flags & PM_EXPORTED)) {
! 			*str = '=';
  			pm->flags |= PM_EXPORTED;
! 			pm->env = *envp++ = ztrdup(*envp2);
! 			*envp = NULL;
  			if (pm->flags & PM_SPECIAL)
! 			    pm->env = replenv(pm->env, getsparam(pm->nam));
! 		    }
  		}
  		*str = '=';
  	    }


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-06-16  4:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-09 11:41 zsh does not execute skripts on AIX? Marco Kattannek
1997-06-09 17:32 ` Zoltan T. Hidvegi
1997-06-10 11:24   ` Marco Kattannek
1997-06-13 15:54     ` Bill Pemberton
1997-06-13 16:55       ` Marco Kattannek
1997-06-16  4:29     ` Zoltan Hidvegi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).