Commit Graph

15 Commits

Author SHA1 Message Date
mp
3ee51a00f3 Update to tcsh 6.18.01. 2012-02-22 03:36:15 +00:00
rdivacky
4117cffd4e 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
2009-10-06 20:19:16 +00:00
mp
e5921a6fae Update to tcsh 6.17.00.
Approved by:	re (kensmith)
2009-07-11 05:35:08 +00:00
mp
5c3d0e09d7 Flatten vendor/tcsh/dist. 2009-07-10 21:00:38 +00:00
ru
604182d32e Actually fix pty detection for autologout setting.
(The fix has been submitted upstream.)
2008-10-20 08:44:14 +00:00
mp
7932b13626 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
2007-10-15 15:23:07 +00:00
mp
a40980339b Import of tcsh-6.15.00 2007-03-11 22:33:41 +00:00
mp
94a109bd81 Import of tcsh-6.14.00 2005-04-24 19:41:08 +00:00
mp
bbd1addf8f Import of tcsh-6.13.00 2004-07-11 02:17:56 +00:00
mp
f2c2aa29b7 Import of tcsh-6.12.00 2002-07-24 16:23:10 +00:00
mp
538cdbc622 Import tcsh-6.11 2001-09-05 17:49:32 +00:00
kris
9b07833722 Import vendor fix for buffer overflow in HOME environment variable 2001-03-03 23:45:43 +00:00
ache
5e7fc01bd9 Initial import of slightly trimmed tcsh 6.10 2000-11-30 21:05:33 +00:00
obrien
efebb8d2fa 6.09.01 vendor update. 2000-04-20 04:22:36 +00:00
obrien
4ad28cefef Import the latest version of the 44BSD C-shell -- tcsh-6.09. 2000-04-15 04:41:27 +00:00