Re: tcsh backtick hang info



On Jul 14, 3:55am, keramida@xxxxxxxxxxx (Giorgos Keramidas) wrote:
-- Subject: Re: tcsh backtick hang info

| On 2007-07-12 14:56, Christos Zoulas <christos@xxxxxxxxxx> wrote:
| > On Jul 12, 11:48am, dwhite@xxxxxxxxxxxxx (Doug White) wrote:
| > -- Subject: Re: tcsh backtick hang info
| >
| > | Thanks for the good words, Christos! If you can confirm this will be the
| > | official patch then we can apply it to our vendor sources. If there are
| > | any other fixes for nasty bugs in 6.15.00 that you're hanging on to it'd
| > | be good to get those out and imported as well.
| >
| > You are welcome!
| > This will be the official patch, and yes I have another 9 bug fixes since
| > 6.15.00. In general, I don't make 6.15.XX generally available, but the
| > severity of some of those problems fixed is high enough to possibly justify
| > a 6.16.00 sooner than later. Here's the list of fixes:
| >
| > 10. kill `foo` got stuck because sigchld was disabled too soon (Mark Peek)
| > 9. Avoid null pointer dereference in proc cwd (Kurt Miller)
| > 8. eval "foreach a b c" exits (Anthony Menasse)
| > 7. Quoting was broken in substitutions (Joe Wells)
| > 6. QNX patches via pkgsrc
| > 5. cd - twice from a directory that contained a glob pattern,
| > expands the glob twice (Mark Santcroos)
| > 4. MidnightBsd support (Lucas Holt)
| > 3. Fix history substitution core-dump with no history entries
| > 2. Merge two character tables that are the same (Martin Kraemer)
| > 1. On ancient 7 bit locales, punctuation characters are used to
| > denote special characters such as umlaut, adiaresis, etc.
| > These characters return true for isalpha/isalnum. Ignore them
| > because they break parsing (Martin Kraemer)
|
| Hi Christos,
|
| Can we persuade you to include the following local patch I keep for
| autologout detection with /dev/pts/XXX ptys in FreeBSD?
|
| %%%
| Fix pty detection logic of tcsh autologout initialization.
|
| Noticed by: kris
|
| diff --git a/contrib/tcsh/sh.c b/contrib/tcsh/sh.c
| --- a/contrib/tcsh/sh.c
| +++ b/contrib/tcsh/sh.c
| @@ -457,7 +457,7 @@ main(int argc, char **argv)
| if (*cp) {
| /* only for login shells or root and we must have a tty */
| if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) {
| - cp = cp2 + 1;
| + cp2 = cp2 + 1;
| }
| else
| cp2 = cp;
| %%%

The code is wrong but I think that the fix is not exactly right... The
following should work:

/* only for login shells or root and we must have a tty */
if ((cp2 = Strrchr(cp, (Char) '/')) != NULL) {
cp2 = cp2 + 1;
}
else
cp2 = cp;
if (!(((Strncmp(cp2, STRtty, 3) == 0) && Isalpha(cp2[3])) ||
Strstr(cp, Strslptssl) != NULL)) {
if (getenv("DISPLAY") == NULL) {
/* NOT on X window shells */
setcopy(STRautologout, STRdefautologout, VAR_READWRITE);
}
}

Thanks for the bug report. wonder how come nobody complained for years!

christos
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Linux 2.6.19
    ... knowing that it's all your own d*mn fault, and you should just fix your ... [SCSI] ... [PATCH] ... USB: ipaq: Add HTC Modem Support ...
    (Linux-Kernel)
  • Re: Linux 2.6.19
    ... knowing that it's all your own d*mn fault, and you should just fix your ... [SCSI] ... [PATCH] ... USB: ipaq: Add HTC Modem Support ...
    (Linux-Kernel)
  • Re: problem with 200GB hard drive
    ... > the partition and then run mkfs.ext3 and format the partition, ... - add patch from Dave Jones ... - fix error message, do block size checking on s390 only ... - automated rebuild ...
    (Fedora)
  • Re: Fix up power managment in 2.6
    ... That is, until the latest round of patches, in which the ... Okay, my point was that the patch was not exactly obvious. ... Trying to fix error handling is good and welcome, ...
    (Linux-Kernel)
  • 2003 Cumulative Patch for Outlook Express (330994) TILDE THUMBNAIL
    ... Is there a fix for the fix? ... Patch that correct this? ... 2003 Cumulative Patch for Outlook Express. ... Windows makes a backup of this file. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)