History log of /freebsd-current/contrib/tcsh/sh.c
Revision Date Author Comments
# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# dd8eeffe 12-Oct-2009 Roman Divacky <rdivacky@FreeBSD.org>

MFC r197812:

Fix tcsh losing history when tcsh terminates because the pty beneath it
is closed.

Diagnosed by Ted Anderson:

New signal queuing logic was introduced in 6.15 and allows the signal handlers
to be run explicitly by calling handle_pending_signals, instead of
immediately when the signal is delivered. This function is called at
various places, typically when receiving a EINTR from a slow system call
such as read or write. In the pty exit case, it was called from xwrite,
called from flush, while printing the "exit" message after receiving EOF
when reading from the pty (note that the read did not return EINTR but
zero bytes, indicating EOF). The SIGHUP handler, phup(), called
rechist, which opened the history file and began writing the merged
history to it. This process invoked flush recursively to actually write
the data. In this case, however, the flush noticed it was being called
recursively and decided fail by calling stderror.

My conclusion was that the signal was being handled at a bad time. But
whether to fix flush not to care about the recursive call, or to handle
the signal some other time and when to handle it, was unclear to me.
However, by adding an extra call to handle_pending_signals, just after
process() returns to main(), I was able to avoid the truncated history
after network outages and similar failures. I verified this fix in
version 6.17.

Approved by: re (kib)


# e05b4980 06-Oct-2009 Roman Divacky <rdivacky@FreeBSD.org>

Fix tcsh losing history when tcsh terminates because the pty beneath it
is closed.

Diagnosed by Ted Anderson:

New signal queuing logic was introduced in 6.15 and allows the signal handlers
to be run explicitly by calling handle_pending_signals, instead of
immediately when the signal is delivered. This function is called at
various places, typically when receiving a EINTR from a slow system call
such as read or write. In the pty exit case, it was called from xwrite,
called from flush, while printing the "exit" message after receiving EOF
when reading from the pty (note that the read did not return EINTR but
zero bytes, indicating EOF). The SIGHUP handler, phup(), called
rechist, which opened the history file and began writing the merged
history to it. This process invoked flush recursively to actually write
the data. In this case, however, the flush noticed it was being called
recursively and decided fail by calling stderror.

My conclusion was that the signal was being handled at a bad time. But
whether to fix flush not to care about the recursive call, or to handle
the signal some other time and when to handle it, was unclear to me.
However, by adding an extra call to handle_pending_signals, just after
process() returns to main(), I was able to avoid the truncated history
after network outages and similar failures. I verified this fix in
version 6.17.

Approved by: ed (mentor)
MFC after: 1 week


# 3b8bd8e7 20-Oct-2008 Ruslan Ermilov <ru@FreeBSD.org>

Actually fix pty detection for autologout setting.
(The fix has been submitted upstream.)


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 5c3ede85 15-Oct-2007 Mark Peek <mp@FreeBSD.org>

Import two vendor fixes from tcsh-6.15.01 for MFC to 7.0. The fixes are:
- Fix pty detection for autologout setting
- kill `foo` got stuck because sigchld was disabled too soon

Requested by: re


# 45e5710b 11-Mar-2007 Mark Peek <mp@FreeBSD.org>

Import of tcsh-6.15.00


# 23338178 24-Apr-2005 Mark Peek <mp@FreeBSD.org>

Import of tcsh-6.14.00


# b2d5d167 10-Jul-2004 Mark Peek <mp@FreeBSD.org>

Import of tcsh-6.13.00


# 29301572 24-Jul-2002 Mark Peek <mp@FreeBSD.org>

Import of tcsh-6.12.00


# 6767bd61 05-Sep-2001 Mark Peek <mp@FreeBSD.org>

Import tcsh-6.11


# 28ae2e3a 03-Mar-2001 Kris Kennaway <kris@FreeBSD.org>

Import vendor fix for buffer overflow in HOME environment variable


# 3b6eaa7b 30-Nov-2000 Andrey A. Chernov <ache@FreeBSD.org>

Initial import of slightly trimmed tcsh 6.10


# 8e66bd9e 19-Apr-2000 David E. O'Brien <obrien@FreeBSD.org>

6.09.01 vendor update.


# c80476e4 14-Apr-2000 David E. O'Brien <obrien@FreeBSD.org>

Import the latest version of the 44BSD C-shell -- tcsh-6.09.