problems execing shell on login

From: David Thiel (lx@wagerworks.com)
Date: Thu Dec 19 2002 - 15:56:11 EST


In my .profile, I have a short thing to find the best shell on
a system, and start it. It goes like this:

#!/bin/sh
SHELLS="/usr/local/bin/zsh /bin/zsh /bin/bash /bin/sh"

for s in $SHELLS
do
    if [ -x $s ]; then
        echo "starting $s"
        SHELL=$s; export SHELL; exec $SHELL
    fi
done

The problem is, on some Solaris machines, the shell is spawned, but
just hangs when I log into the box. This happens regardless of
which shell is first in $SHELLS, but only when I have "exec $SHELL",
and not if I remove the exec. If I exec "ls", it seems to work
fine. When I truss the shell (zsh in this case), I get this message
repeating:

    Received signal #14, SIGALRM, in sigsuspend() [caught]
sigsuspend(0xFFBEFC68) Err#4 EINTR
setcontext(0xFFBEF950)
alarm(0) = 0
sigprocmask(SIG_UNBLOCK, 0xFFBEFC88, 0x00000000) = 0
sigaction(SIGALRM, 0xFFBEFBE8, 0x00000000) = 0
getpgrp() = 15540
ioctl(10, TIOCGSID, 0xFFBEFC6C) = 0
getsid(0) = 15540
ioctl(10, TIOCGPGRP, 0xFFBEFCD4) = 0
kill(-15540, SIGTTIN) = 0
    Received signal #26, SIGTTIN [ignored]
      siginfo: SIGTTIN pid=15541 uid=2099
getpgrp() = 15540
ioctl(10, TIOCGSID, 0xFFBEFC6C) = 0
getsid(0) = 15540
ioctl(10, TIOCGPGRP, 0xFFBEFCD4) = 0
alarm(0) = 0
sigaction(SIGALRM, 0xFFBEFBE8, 0xFFBEFC98) = 0
sigprocmask(SIG_BLOCK, 0xFFBEFC88, 0xFFBEFC78) = 0
alarm(1) = 0

Anyone have any idea why this might be happening?

Thanks,
David
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:30 EDT