History log of /freebsd-9.3-release/contrib/tcsh/sh.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 232633 06-Mar-2012 mp

MFC r231990

Update to tcsh 6.18.01


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 197812 06-Oct-2009 rdivacky

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


# 195609 11-Jul-2009 mp

Update to tcsh 6.17.00.

Approved by: re (kensmith)


# 184072 20-Oct-2008 ru

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


# 172666 15-Oct-2007 mp

This commit was generated by cvs2svn to compensate for changes in r172665,
which included commits to RCS files with non-trunk default branches.


# 172665 15-Oct-2007 mp

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


# 167465 11-Mar-2007 mp

Import of tcsh-6.15.00


# 145479 24-Apr-2005 mp

Import of tcsh-6.14.00


# 131962 11-Jul-2004 mp

Import of tcsh-6.13.00


# 100616 24-Jul-2002 mp

Import of tcsh-6.12.00


# 83098 05-Sep-2001 mp

Import tcsh-6.11


# 73393 03-Mar-2001 kris

Import vendor fix for buffer overflow in HOME environment variable


# 69408 30-Nov-2000 ache

Initial import of slightly trimmed tcsh 6.10


# 59415 20-Apr-2000 obrien

6.09.01 vendor update.


# 59243 15-Apr-2000 obrien

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