Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Nov 2008 20:20:37 -0800
From:      Steve Watt <steve@Watt.COM>
To:        hackers@freebsd.org
Subject:   tcsh loses the foreground process group?
Message-ID:  <20081201042037.GA43208@wattres.Watt.COM>

next in thread | raw e-mail | index | archive | help
(Please don't cc: me on replies, I can usually keep up with -hackers.)

I've run into this about 5 or 6 times recently, and it seems to have
survived the last couple of world updates.

I'm running 6-STABLE (6.4-PRE as of 24 Nov right now), tcsh 6.15.00, which
shows

  tcsh 6.15.00 (Astron) 2007-03-03 (i386-intel-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec

as $version.

The symptom is that when I do a long-ish running task inside a `` expansion
that I then ^C, nobody gets the foreground process group...  I never get
a prompt back after the ^C, and ^T gets me

  load: 0.27 no foreground process group

Sending SIGCHLD and/or SIGCONT to the tcsh doesn't seem to make any
difference at all.

The tcsh is sitting in "pause" WCHAN, which seems sensible.  A truss
on tcsh reveals (oddly enough) that it's sitting in sigsuspend().
Sending it signals makes it loop through a wait4() call and go back into
sigsuspend().

It happens running either as root (from sudo) or as a regular user.  It
happens under xterm, under ssh sessions, and on a direct console login.

One portable reproduction:
# cd /usr/src
# less `egrep -lir '^Foo.*baz' *`
^Cload: 0.02 no foreground process group

(I typed ^C ^T)

SIGKILL to the shell seems to be the only way to get things back to
normal.

I'm not sure how to isolate it further - it seems likely that this is
a bug in the kernel, rather than in tcsh, but the session management
stuff is pretty hairy in both places.

Does anyone have debugging thoughts?
-- 
Steve Watt KD6GGD  PP-ASEL-IA          ICBM: 121W 56' 57.5" / 37N 20' 15.3"
 Internet: steve @ Watt.COM                      Whois: SW32-ARIN
   Free time?  There's no such thing.  It just comes in varying prices...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081201042037.GA43208>