C shell hangs after executing any command on solaris

C shell hangs after executing any command on solaris

Post by trobin.. » Fri, 22 Sep 2000 04:00:00



Hello

I have a wierd problem which has just started happening on my solaris
2.5 box.

If I am in c shell (csh), every time it executes a program, the
shell hangs after the program has finished. This applies to csh scripts
as well as interactive use. It responds fine to builtin commands but
if I do, say, "ls", the output from ls comes out on the screen fine and
I can see that the ls process has exited, but the shell never comes back
with a prompt.

I have done on a truss on the csh and it is sleeping in a sigsuspend
call.

I have tried getting rid of all environment variables before invoking
the csh but this doesn't help.

The box is running fine apart from that; all other shells work OK; and
the csh binary itself looks OK so I am really stuck.

Something else strange that started happning around the same time is if
you
telnet onto the box and log in as any user, you get a '#' prompt,
whereas if you are already logged in then you do 'exec login' and login
you get the correct prompt (%). All the users have ksh as their login
shell so I don't know if this can be related to the csh problem.

I have no idea what caused it to get into this state - we don't use csh
much apart from a few old scripts. The only thing I can think of that's
happened recently is we have installed samba, but I would guess that's
a red herring.

grateful for any ideas or suggestions from any remaining c shell users
out there

--- Tim Robinson

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

C shell hangs after executing any command on solaris

Post by Arthur Darren Dunh » Fri, 22 Sep 2000 04:00:00



>Something else strange that started happning around the same time is if
>you
>telnet onto the box and log in as any user, you get a '#' prompt,
>whereas if you are already logged in then you do 'exec login' and login
>you get the correct prompt (%). All the users have ksh as their login
>shell so I don't know if this can be related to the csh problem.

I don't know about the other things, but this is suggestive of someone
killing and restarting inetd instead of just sending a HUP.

inetd then enherits their environment and passes it on to children (like
telnetd).  That might include the USER variable.  If you set a prompt
based on that it would be wrong.

1) check if this is right.  '/usr/ucb/ps -eww  <PID>' and give it the
inetd pid.  Normal won't have USER or anything other than Locale, Path,
and TZ set.

2) Don't kill inetd.  Just HUP it.  

3) To fix it this time, you might try to use env -i combined with just a
few environments and relaunch it.

Good luck.
--

Unix System Administrator                    Taos - The SysAdmin Company
Got some Dr Pepper?                               San Francisco Bay Area
      < Please move on, ...nothing to see here,  please disperse >

 
 
 

C shell hangs after executing any command on solaris

Post by trobin.. » Sat, 23 Sep 2000 04:00:00


Darren,

spot on - I stopped and restarted the inetd with minimal environment
and it cured the problem

--- Tim





> >Something else strange that started happning around the same time is
if
> >you
> >telnet onto the box and log in as any user, you get a '#' prompt,
> >whereas if you are already logged in then you do 'exec login' and
login
> >you get the correct prompt (%). All the users have ksh as their login
> >shell so I don't know if this can be related to the csh problem.

> I don't know about the other things, but this is suggestive of someone
> killing and restarting inetd instead of just sending a HUP.

> inetd then enherits their environment and passes it on to children
(like
> telnetd).  That might include the USER variable.  If you set a prompt
> based on that it would be wrong.

> 1) check if this is right.  '/usr/ucb/ps -eww  <PID>' and give it the
> inetd pid.  Normal won't have USER or anything other than Locale,
Path,
> and TZ set.

> 2) Don't kill inetd.  Just HUP it.

> 3) To fix it this time, you might try to use env -i combined with
just a
> few environments and relaunch it.

> Good luck.
> --
> Darren Dunham


Quote:> Unix System Administrator                    Taos - The SysAdmin
Company
> Got some Dr Pepper?                               San Francisco Bay
Area
>       < Please move on, ...nothing to see here,  please disperse >

Sent via Deja.com http://www.deja.com/
Before you buy.
 
 
 

C shell hangs after executing any command on solaris

Post by bmar.. » Sat, 23 Sep 2000 04:00:00



   >Newsgroups: comp.unix.solaris,comp.unix.shell
   >Date: Thu, 21 Sep 2000 08:09:12 GMT
   >Organization: Deja.com - Before you buy.
   >Lines: 41
   >NNTP-Posting-Host: 195.171.154.43
   >X-Article-Creation-Date: Thu Sep 21 08:09:12 2000 GMT
   >X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.
   >0) X-Http-Proxy: 1.1 x59.deja.com:80 (Squid/1.1.22) for client 195.
   >171.154.43 X-MyDeja-Info: XMYDJUIDtrobinson
   >Path: news.iglou.com!dca1-feed3.news.digex.net!intermedia!cyclone.
   >columbus.rr.com!news.rr.com!cyclone-midwest.rr.com!newsfeed2.s
   >Xref: news-incoming.iglou.com comp.unix.solaris:245814 comp.unix.
   >shell:90081 Hello
   >I have a wierd problem which has just started happening on my
   >solaris 2.5 box.
   >If I am in c shell (csh), every time it executes a program, the
   >shell hangs after the program has finished. This applies to csh
   >scripts as well as interactive use. It responds fine to builtin
What is in your .cshrc?

Net-Tamer V 1.08X - Test Drive

 
 
 

1. C shell hangs after executing a command on solaris 2.5

Hello

I have a wierd problem which has just started happening on my solaris
2.5 box.

If I am in c shell (csh), every time it executes a program, the
shell hangs after the program has finished. This applies to csh scripts
as well as interactive use. It responds fine to builtin commands but
if I do, say, "ls", the output from ls comes out on the screen fine and
I can see (by doing ps in a different window) that the ls has exited,
but the shell never comes back with a prompt.

I can kill it with -STOP or -9 from another session, but ^C etc doesn't
seem to have any effect at all.

I have tried getting rid of all environment variables before invoking
the csh but this doesn't help either.

It's not using any CPU when it gets into this state; The box is
running fine apart from that; all other shells work OK; and the csh
binary itself looks OK so I am really stuck.

I have no idea what caused it to get into this state - we don't use csh
much apart from a few old scripts. The only thing I can think of that's
happened recently is we have installed samba, but I would guess that's
a red herring.

grateful for any ideas or suggestions from any remaining c shell users
out there

--- Tim Robinson

Sent via Deja.com http://www.deja.com/
Before you buy.

2. [RFC] IDE locking #2

3. problem with executing commands from within the shell using a command string.

4. Networking 10base2 continued

5. emacs shell-command-on-region command can't execute on Slackware.

6. Windows in a dosemu hdimage ???

7. Executing a command in Solaris 2.7 Bourne shell.

8. Volume group question

9. how to invoke another shell inside an shell and then execute the command

10. Informix problems afters Y2K Solaris 2.5 patch

11. Help on Changing user and executing commands using shell script

12. Shell executes command and gives back prompt

13. Why does the following shell script executes differently than the command prompt