*** empty log message ***
authorroot <root>
Mon, 2 Jan 2006 15:10:18 +0000 (15:10 +0000)
committerroot <root>
Mon, 2 Jan 2006 15:10:18 +0000 (15:10 +0000)
13 files changed:
Changes
README.FAQ
README.configure
doc/rxvt.1.html
doc/rxvt.1.man.in
doc/rxvt.1.txt
doc/rxvt.7.html
doc/rxvt.7.man.in
doc/rxvt.7.txt
src/ptytty.C
src/ptytty.h
src/rxvt.h
src/version.h

diff --git a/Changes b/Changes
index 2b516614cce912ec4bc657b31fbee9de2c628efe..02cbe92c2401065f74b6cbfb8b6f4cf19e03c914 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,23 +1,18 @@
 rxvt-unicode changelog <= google-friendly title
 
-TODO: move iso14755 box away from the mouse
 TODO: harmonize --disable-options into position-dependent options.
 TODO: after requesting the selection and getting a timeout, no further requests will be sent.
 TODO: safer command: keymap processing.
 TODO: "slow" rendering mode for bidi and scripts
 TODO: read property sequence is broken with respect to utf-8 etc.
 TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
-WISH: keymap modification via esc-sequences.
-WISH: searchable backlog
-WISH: meta-tagging of data by regex/master process (my dream project)
+WISH: keymap modification via esc-sequences. (obsoleted by embedded perl)
+WISH: searchable backlog (obsoleted by embedded perl)
+WISH: meta-tagging of data by regex/master process (obsoleted by embedded perl)
 WISH: OnTheSpot editing, or maybe switch to miiiiiiif
 WISH: just for fun, do shade and tint with XRender.
 
-6.2
-        - SECURITY FIX: on systems using openpty (not GNU/Linux, probably
-          most BSDs), privileges weren't dropped before opening the pty,
-          resulting in wrong permissions on the pseudo terminal.
-          Reported and fixed by Ryan Beasley.
+6.2  Mon Jan  2 16:03:01 CET 2006
         - implemented intensityStyles option which enables/disables bold/blink
           selecting high intensity foreground/background colours, suggested by
           Chuck Blake.
index 942356a1f81d8e862978f96a38b37ccd4eb9a67b..7f7c3e4521055138c2254817057ad5e8327ae2c3 100644 (file)
@@ -85,7 +85,7 @@ FREQUENTLY ASKED QUESTIONS
     How do I know which rxvt-unicode version I'm using?
         The version number is displayed with the usage (-h). Also the escape
         sequence "ESC [ 8 n" sets the window title to the version number.
-        When using the urxvtc client, the version displayed is that of the
+        When using the rxvtc client, the version displayed is that of the
         daemon.
 
     I am using Debian GNU/Linux and have a problem...
@@ -136,7 +136,7 @@ FREQUENTLY ASKED QUESTIONS
         Most likely it's the empty definition for "enacs=". Just replace it
         by "enacs=\E[0@" and try again.
 
-    "bash"'s readline does not work correctly under urxvt.
+    "bash"'s readline does not work correctly under rxvt.
     I need a termcap file entry.
         One reason you might want this is that some distributions or
         operating systems still compile some programs using the
@@ -257,7 +257,7 @@ FREQUENTLY ASKED QUESTIONS
         In that case, select a font of your taste and add it to the font
         list, e.g.:
 
-           urxvt -fn basefont,font2,font3...
+           rxvt -fn basefont,font2,font3...
 
         When rxvt-unicode sees a character, it will first look at the base
         font. If the base font does not contain the character, it will go to
@@ -552,7 +552,7 @@ FREQUENTLY ASKED QUESTIONS
         some editors prematurely may leave the mouse in mouse report mode.
         I've heard that tcsh may use mouse reporting unless it otherwise
         specified. A quick check is to see if cut/paste works when the Alt
-        or Shift keys are depressed. See urxvt(7)
+        or Shift keys are depressed. See rxvt(7)
 
     What's with this bold/blink stuff?
         If no bold colour is set via "colorBD:", bold will invert text using
@@ -617,9 +617,9 @@ FREQUENTLY ASKED QUESTIONS
            URxvt.color7:       #e1dddd
            URxvt.color15:      #e1dddd
 
-    How can I start urxvtd in a race-free way?
-        Try "urxvtd -f -o", which tells urxvtd to open the display, create
-        the listening socket and then fork.
+    How can I start rxvtd in a race-free way?
+        Try "rxvtd -f -o", which tells rxvtd to open the display, create the
+        listening socket and then fork.
 
     What's with the strange Backspace/Delete key behaviour?
         Assuming that the physical Backspace key corresponds to the
@@ -642,13 +642,13 @@ FREQUENTLY ASKED QUESTIONS
 
            # use Backspace = ^H
            $ stty erase ^H
-           $ urxvt
+           $ rxvt
 
            # use Backspace = ^?
            $ stty erase ^?
-           $ urxvt
+           $ rxvt
 
-        Toggle with "ESC [ 36 h" / "ESC [ 36 l" as documented in urxvt(7).
+        Toggle with "ESC [ 36 h" / "ESC [ 36 l" as documented in rxvt(7).
 
         For an existing rxvt-unicode:
 
@@ -684,7 +684,7 @@ FREQUENTLY ASKED QUESTIONS
         option you can use the `keysym' resource to alter the keystrings
         associated with keysyms.
 
-        Here's an example for a URxvt session started using "urxvt -name
+        Here's an example for a URxvt session started using "rxvt -name
         URxvt"
 
            URxvt.keysym.Home:          \033[1~
index 79cb9c9c56f5aa891e7ae3cf7f32c9979d4faf9b..788fbca1f1cbb636a53bdb6d6055f69169de4ca5 100644 (file)
@@ -200,7 +200,7 @@ CONFIGURE OPTIONS
           -embed, -pty-fd and -hold options
 
     --enable-iso14755 (default: on)
-        Enable extended ISO 14755 support (see urxvt(1), or doc/rxvt.1.txt).
+        Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
         Basic support (section 5.1) is enabled by "--enable-frills", while
         support for 5.2, 5.3 and 5.4 is enabled with this switch.
 
index 2368b8d01b1c62c70c125e25ea6f15eb53382e8b..4c7f999941cdd8bd592cf3d7b385436d621a7347 100644 (file)
@@ -48,7 +48,7 @@
 </p>
 <hr />
 <h1><a name="description">DESCRIPTION</a></h1>
-<p><strong>rxvt-unicode</strong>, version <strong>6.1</strong>, is a colour vt102 terminal
+<p><strong>rxvt-unicode</strong>, version <strong>6.2</strong>, is a colour vt102 terminal
 emulator intended as an <em>xterm</em>(1) replacement for users who do not
 require features such as Tektronix 4014 emulation and toolkit-style
 configurability. As a result, <strong>rxvt-unicode</strong> uses much less swap space --
@@ -286,6 +286,14 @@ Compile font-styles: The bold italic font list to use when bold characters are t
 be printed. See resource <strong>boldItalicFont</strong> for details.
 </dd>
 <p></p>
+<dt><strong><a name="item__2dis_7c_2bis"><strong>-is</strong>|<strong>+is</strong></a></strong><br />
+</dt>
+<dd>
+Compile font-styles: Bold/Italic font styles imply high intensity
+foreground/background (default). See resource <strong>intensityStyles</strong> for
+details.
+</dd>
+<p></p>
 <dt><strong><a name="item__2dname_name"><strong>-name</strong> <em>name</em></a></strong><br />
 </dt>
 <dd>
@@ -920,6 +928,16 @@ not possible, replacement fonts of the desired shape will be tried.</p>
 text font will being used for the given style.</p>
 </dd>
 <p></p>
+<dt><strong><a name="item_intensitystyles_3a_boolean"><strong>intensityStyles:</strong> <em>boolean</em></a></strong><br />
+</dt>
+<dd>
+When font styles are not enabled, or this option is enabled (<strong>True</strong>,
+option <strong>-is</strong>, the default), bold and italic font styles imply high
+intensity foreground/backround colours. Disabling this option (<strong>False</strong>,
+option <strong>+is</strong>) disables this behaviour, the high intensity colours are not
+reachable.
+</dd>
+<p></p>
 <dt><strong><a name="item_selectstyle_3a_mode"><strong>selectstyle:</strong> <em>mode</em></a></strong><br />
 </dt>
 <dd>
index d106960fbed57177abe3f22736a0359abed78bb6..2072449f96488b931cbb071a069b4f980d0a819b 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 1"
-.TH rxvt 1 "2005-12-27" "6.1" "RXVT-UNICODE"
+.TH rxvt 1 "2006-01-02" "6.2" "RXVT-UNICODE"
 .SH "NAME"
 rxvt\-unicode (ouR XVT, unicode) \- (a VT102 emulator for the X window system)
 .SH "SYNOPSIS"
@@ -310,6 +310,11 @@ be printed. See resource \fBitalicFont\fR for details.
 .IX Item "-fbi fontlist"
 Compile font\-styles: The bold italic font list to use when bold characters are to
 be printed. See resource \fBboldItalicFont\fR for details.
+.IP "\fB\-is\fR|\fB+is\fR" 4
+.IX Item "-is|+is"
+Compile font\-styles: Bold/Italic font styles imply high intensity
+foreground/background (default). See resource \fBintensityStyles\fR for
+details.
 .IP "\fB\-name\fR \fIname\fR" 4
 .IX Item "-name name"
 Specify the application name under which resources are to be obtained,
@@ -747,6 +752,13 @@ not possible, replacement fonts of the desired shape will be tried.
 .Sp
 If set, but empty, then this specific style is disabled and the normal
 text font will being used for the given style.
+.IP "\fBintensityStyles:\fR \fIboolean\fR" 4
+.IX Item "intensityStyles: boolean"
+When font styles are not enabled, or this option is enabled (\fBTrue\fR,
+option \fB\-is\fR, the default), bold and italic font styles imply high
+intensity foreground/backround colours. Disabling this option (\fBFalse\fR,
+option \fB+is\fR) disables this behaviour, the high intensity colours are not
+reachable.
 .IP "\fBselectstyle:\fR \fImode\fR" 4
 .IX Item "selectstyle: mode"
 Set mouse selection style to \fBold\fR which is 2.20, \fBoldword\fR which is
index 57f4ea565282fd78cca7b9f7b6eeb56835f5c316..5b159a87d1af690fd92048b599b55c63a0a03e17 100644 (file)
@@ -6,7 +6,7 @@ SYNOPSIS
     rxvt [options] [-e command [ args ]]
 
 DESCRIPTION
-    rxvt-unicode, version 6.1, is a colour vt102 terminal emulator intended
+    rxvt-unicode, version 6.2, is a colour vt102 terminal emulator intended
     as an *xterm*(1) replacement for users who do not require features such
     as Tektronix 4014 emulation and toolkit-style configurability. As a
     result, rxvt-unicode uses much less swap space -- a significant
@@ -177,6 +177,11 @@ OPTIONS
         characters are to be printed. See resource boldItalicFont for
         details.
 
+    -is|+is
+        Compile font-styles: Bold/Italic font styles imply high intensity
+        foreground/background (default). See resource intensityStyles for
+        details.
+
     -name *name*
         Specify the application name under which resources are to be
         obtained, rather than the default executable file name. Name should
@@ -598,6 +603,13 @@ RESOURCES (available also as long-options)
         If set, but empty, then this specific style is disabled and the
         normal text font will being used for the given style.
 
+    intensityStyles: *boolean*
+        When font styles are not enabled, or this option is enabled (True,
+        option -is, the default), bold and italic font styles imply high
+        intensity foreground/backround colours. Disabling this option
+        (False, option +is) disables this behaviour, the high intensity
+        colours are not reachable.
+
     selectstyle: *mode*
         Set mouse selection style to old which is 2.20, oldword which is
         xterm style with 2.20 old word selection, or anything else which
index 3f11938caca9d60135521ed5cb27aa9944cde9a8..307b0cd773ddcf5187cb1b200b4280dbf6137278 100644 (file)
@@ -187,7 +187,7 @@ embedding application.
 <dd>
 The version number is displayed with the usage (-h). Also the escape
 sequence <code>ESC [ 8 n</code> sets the window title to the version number. When
-using the urxvtc client, the version displayed is that of the
+using the rxvtc client, the version displayed is that of the
 daemon.
 </dd>
 <p></p>
@@ -256,7 +256,7 @@ Most likely it's the empty definition for <code>enacs=</code>. Just replace it b
 <code>enacs=\E[0@</code> and try again.
 </dd>
 <p></p>
-<dt><strong><a name="item_bash_27s_readline_does_not_work_correctly_under_ur"><code>bash</code>'s readline does not work correctly under urxvt.</a></strong><br />
+<dt><strong><a name="item_bash_27s_readline_does_not_work_correctly_under_rx"><code>bash</code>'s readline does not work correctly under rxvt.</a></strong><br />
 </dt>
 <dt><strong><a name="item_i_need_a_termcap_file_entry_2e">I need a termcap file entry.</a></strong><br />
 </dt>
@@ -420,7 +420,7 @@ e.g.:</p>
 </dd>
 <dd>
 <pre>
-   urxvt -fn basefont,font2,font3...</pre>
+   rxvt -fn basefont,font2,font3...</pre>
 </dd>
 <dd>
 <p>When rxvt-unicode sees a character, it will first look at the base
@@ -804,7 +804,7 @@ Make sure that mouse reporting is actually turned off since killing
 some editors prematurely may leave the mouse in mouse report mode. I've
 heard that tcsh may use mouse reporting unless it otherwise specified. A
 quick check is to see if cut/paste works when the Alt or Shift keys are
-depressed. See <code>urxvt(7)</code>
+depressed. See <code>rxvt(7)</code>
 </dd>
 <p></p>
 <dt><strong><a name="item_what_27s_with_this_bold_2fblink_stuff_3f">What's with this bold/blink stuff?</a></strong><br />
@@ -888,10 +888,10 @@ me) as ``pretty girly''.</p>
    URxvt.color15:      #e1dddd</pre>
 </dd>
 <p></p>
-<dt><strong><a name="item_how_can_i_start_urxvtd_in_a_race_2dfree_way_3f">How can I start urxvtd in a race-free way?</a></strong><br />
+<dt><strong><a name="item_how_can_i_start_rxvtd_in_a_race_2dfree_way_3f">How can I start rxvtd in a race-free way?</a></strong><br />
 </dt>
 <dd>
-Try <code>urxvtd -f -o</code>, which tells urxvtd to open the
+Try <code>rxvtd -f -o</code>, which tells rxvtd to open the
 display, create the listening socket and then fork.
 </dd>
 <p></p>
@@ -922,16 +922,16 @@ be used (which may not be the same as your stty setting).</p>
 <pre>
    # use Backspace = ^H
    $ stty erase ^H
-   $ urxvt</pre>
+   $ rxvt</pre>
 </dd>
 <dd>
 <pre>
    # use Backspace = ^?
    $ stty erase ^?
-   $ urxvt</pre>
+   $ rxvt</pre>
 </dd>
 <dd>
-<p>Toggle with <code>ESC [ 36 h</code> / <code>ESC [ 36 l</code> as documented in urxvt(7).</p>
+<p>Toggle with <code>ESC [ 36 h</code> / <code>ESC [ 36 l</code> as documented in rxvt(7).</p>
 </dd>
 <dd>
 <p>For an existing rxvt-unicode:</p>
@@ -979,7 +979,7 @@ you have run ``configure'' with the <a href="#item__2d_2ddisable_2dresources"><c
 use the `keysym' resource to alter the keystrings associated with keysyms.
 </dd>
 <dd>
-<p>Here's an example for a URxvt session started using <code>urxvt -name URxvt</code></p>
+<p>Here's an example for a URxvt session started using <code>rxvt -name URxvt</code></p>
 </dd>
 <dd>
 <pre>
@@ -1815,6 +1815,11 @@ Enter Tektronix Mode (DECTEK)
 <table>
 <tr><td>h</td><td>Scroll to bottom when a key is pressed</td></tr>
 <tr><td>l</td><td>Don't scroll to bottom when a key is pressed</td></tr>
+</table><dt><strong><a name="item_1021"><strong><code>Ps = 1021</code> </strong>&gt; (<strong>rxvt</strong>)</a></strong><br />
+</dt>
+<table>
+<tr><td>h</td><td>Bold/italic implies high intensity (see option -is)</td></tr>
+<tr><td>l</td><td>Font styles have no effect on intensity (Compile styles)</td></tr>
 </table><dt><strong><a name="item_ps__3d_1047"><strong><code>Ps = 1047</code> </strong>&gt;</a></strong><br />
 </dt>
 <table>
@@ -2944,7 +2949,7 @@ in combination with other switches) is:</p>
 <dt><strong><a name="item_iso14755">--enable-iso14755 (default: on)</a></strong><br />
 </dt>
 <dd>
-Enable extended ISO 14755 support (see urxvt(1), or
+Enable extended ISO 14755 support (see rxvt(1), or
 <em>doc/rxvt.1.txt</em>). Basic support (section 5.1) is enabled by
 <code>--enable-frills</code>, while support for 5.2, 5.3 and 5.4 is enabled with
 this switch.
index 21e398edc39b51a0aabd5595c3e8510991e620d5..575c5dec3ceee2be3e7510b99a5f254ea2736db4 100644 (file)
 .\" ========================================================================
 .\"
 .IX Title "rxvt 7"
-.TH rxvt 7 "2005-12-24" "6.0" "RXVT-UNICODE"
+.TH rxvt 7 "2006-01-02" "6.2" "RXVT-UNICODE"
 .SH "NAME"
 RXVT REFERENCE \- FAQ, command sequences and other background information
 .SH "SYNOPSIS"
@@ -1676,6 +1676,15 @@ h        Scroll to bottom when a key is pressed
 l      Don't scroll to bottom when a key is pressed
 .TE
 
+.ie n .IP "\fB\fB""Ps = 1021""\fB\fR (\fBrxvt\fR)" 4
+.el .IP "\fB\f(CBPs = 1021\fB\fR (\fBrxvt\fR)" 4
+.IX Item "Ps = 1021 (rxvt)"
+.TS
+l l .
+h      Bold/italic implies high intensity (see option -is)
+l      Font styles have no effect on intensity (Compile styles)
+.TE
+
 .ie n .IP "\fB\fB""Ps = 1047""\fB\fR" 4
 .el .IP "\fB\f(CBPs = 1047\fB\fR" 4
 .IX Item "Ps = 1047"
index e94e18e0c28e727a33b4e790a5fdb7d40d3d41a8..183db6e3e50af04588886e4320631a673f5ce528 100644 (file)
@@ -106,7 +106,7 @@ FREQUENTLY ASKED QUESTIONS
     How do I know which rxvt-unicode version I'm using?
         The version number is displayed with the usage (-h). Also the escape
         sequence "ESC [ 8 n" sets the window title to the version number.
-        When using the urxvtc client, the version displayed is that of the
+        When using the rxvtc client, the version displayed is that of the
         daemon.
 
     I am using Debian GNU/Linux and have a problem...
@@ -157,7 +157,7 @@ FREQUENTLY ASKED QUESTIONS
         Most likely it's the empty definition for "enacs=". Just replace it
         by "enacs=\E[0@" and try again.
 
-    "bash"'s readline does not work correctly under urxvt.
+    "bash"'s readline does not work correctly under rxvt.
     I need a termcap file entry.
         One reason you might want this is that some distributions or
         operating systems still compile some programs using the
@@ -278,7 +278,7 @@ FREQUENTLY ASKED QUESTIONS
         In that case, select a font of your taste and add it to the font
         list, e.g.:
 
-           urxvt -fn basefont,font2,font3...
+           rxvt -fn basefont,font2,font3...
 
         When rxvt-unicode sees a character, it will first look at the base
         font. If the base font does not contain the character, it will go to
@@ -573,7 +573,7 @@ FREQUENTLY ASKED QUESTIONS
         some editors prematurely may leave the mouse in mouse report mode.
         I've heard that tcsh may use mouse reporting unless it otherwise
         specified. A quick check is to see if cut/paste works when the Alt
-        or Shift keys are depressed. See urxvt(7)
+        or Shift keys are depressed. See rxvt(7)
 
     What's with this bold/blink stuff?
         If no bold colour is set via "colorBD:", bold will invert text using
@@ -638,9 +638,9 @@ FREQUENTLY ASKED QUESTIONS
            URxvt.color7:       #e1dddd
            URxvt.color15:      #e1dddd
 
-    How can I start urxvtd in a race-free way?
-        Try "urxvtd -f -o", which tells urxvtd to open the display, create
-        the listening socket and then fork.
+    How can I start rxvtd in a race-free way?
+        Try "rxvtd -f -o", which tells rxvtd to open the display, create the
+        listening socket and then fork.
 
     What's with the strange Backspace/Delete key behaviour?
         Assuming that the physical Backspace key corresponds to the
@@ -663,13 +663,13 @@ FREQUENTLY ASKED QUESTIONS
 
            # use Backspace = ^H
            $ stty erase ^H
-           $ urxvt
+           $ rxvt
 
            # use Backspace = ^?
            $ stty erase ^?
-           $ urxvt
+           $ rxvt
 
-        Toggle with "ESC [ 36 h" / "ESC [ 36 l" as documented in urxvt(7).
+        Toggle with "ESC [ 36 h" / "ESC [ 36 l" as documented in rxvt(7).
 
         For an existing rxvt-unicode:
 
@@ -705,7 +705,7 @@ FREQUENTLY ASKED QUESTIONS
         option you can use the `keysym' resource to alter the keystrings
         associated with keysyms.
 
-        Here's an example for a URxvt session started using "urxvt -name
+        Here's an example for a URxvt session started using "rxvt -name
         URxvt"
 
            URxvt.keysym.Home:          \033[1~
@@ -1233,6 +1233,10 @@ DEC Private Modes
                h               Scroll to bottom when a key is pressed 
                l               Don't scroll to bottom when a key is pressed 
 
+        "Ps = 1021" (rxvt)
+               h               Bold/italic implies high intensity (see option -is) 
+               l               Font styles have no effect on intensity (Compile styles) 
+
         "Ps = 1047"
                h               Use Alternate Screen Buffer 
                l               Use Normal Screen Buffer - clear Alternate Screen Buffer if returning from it 
@@ -1956,7 +1960,7 @@ CONFIGURE OPTIONS
           -embed, -pty-fd and -hold options
 
     --enable-iso14755 (default: on)
-        Enable extended ISO 14755 support (see urxvt(1), or doc/rxvt.1.txt).
+        Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
         Basic support (section 5.1) is enabled by "--enable-frills", while
         support for 5.2, 5.3 and 5.4 is enabled with this switch.
 
index 47b97a415ce61b0b96c2518a7c42ca65fa1a6cfe..149dcede3a9d82dd4aa9ef112b2cca21ba82bb1f 100644 (file)
@@ -76,13 +76,9 @@ get_pty (int *fd_tty, char **ttydev)
   int pfd;
 
 #ifdef PTYS_ARE_OPENPTY
-  char tty_name[sizeof "/dev/pts/?????\0"];
+  char tty_name[sizeof "/dev/pts/????\0"];
 
-  rxvt_privileges (RESTORE);
-  int res = openpty (&pfd, fd_tty, tty_name, NULL, NULL);
-  rxvt_privileges (IGNORE);
-
-  if (res != -1)
+  if (openpty (&pfd, fd_tty, tty_name, NULL, NULL) != -1)
     {
       *ttydev = strdup (tty_name);
       return pfd;
@@ -96,7 +92,6 @@ get_pty (int *fd_tty, char **ttydev)
 #endif
 
 #ifdef PTYS_ARE_GETPTY
-
   char           *ptydev;
 
   while ((ptydev = getpty ()) != NULL)
@@ -340,21 +335,21 @@ static struct ttyconf {
 void
 rxvt_ptytty::privileges (rxvt_privaction action)
 {
-  if (pty < 0)
+  if (!name || !*name)
     return;
 
   rxvt_privileges (RESTORE);
 
   if (action == SAVE)
     {
-      //next_tty_action = RESTORE;
 # ifndef RESET_TTY_TO_COMMON_DEFAULTS
       /* store original tty status for restoration rxvt_clean_exit () -- rgg 04/12/95 */
       if (lstat (name, &savestat) < 0)       /* you lose out */
-        ;//next_tty_action = IGNORE;
+        ;
       else
 # endif
         {
+          saved = true;
           chown (name, getuid (), ttyconf.gid);      /* fail silently */
           chmod (name, ttyconf.mode);
 # ifdef HAVE_REVOKE
@@ -364,10 +359,12 @@ rxvt_ptytty::privileges (rxvt_privaction action)
     }
   else
     {                    /* action == RESTORE */
-      //next_tty_action = IGNORE;
 # ifndef RESET_TTY_TO_COMMON_DEFAULTS
-      chmod (name, savestat.st_mode);
-      chown (name, savestat.st_uid, savestat.st_gid);
+      if (saved)
+        {
+          chmod (name, savestat.st_mode);
+          chown (name, savestat.st_uid, savestat.st_gid);
+        }
 # else
       chmod (name, (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH));
       chown (name, 0, 0);
@@ -383,6 +380,9 @@ rxvt_ptytty::rxvt_ptytty ()
 {
   pty = tty = -1;
   name = 0;
+#ifndef NO_SETOWNER_TTYDEV
+  saved = false;
+#endif
 }
 
 rxvt_ptytty::~rxvt_ptytty ()
index 78075ffdcda3f4c3f223702b4536672b0d354baf..9ed74d6a0e1458c47aa2e10cdc3b0eda5d921b19 100644 (file)
@@ -1,7 +1,16 @@
 #ifndef PTYTTY_H
 #define PTYTTY_H
 
-#include "rxvt.h"
+#include "feature.h"
+
+#if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT)
+# if defined(PTYS_ARE_GETPT) || defined(PTYS_ARE_PTMX)
+#  define NO_SETOWNER_TTYDEV 1
+# endif
+#endif
+#if defined(__CYGWIN32__) || defined(PTYS_ARE_OPENPTY)
+# define NO_SETOWNER_TTYDEV 1
+#endif
 
 enum rxvt_privaction { IGNORE = 'i', SAVE = 's', RESTORE = 'r' };
 
@@ -9,7 +18,10 @@ struct rxvt_ptytty {
 #ifndef RESET_TTY_TO_COMMON_DEFAULTS
   struct stat savestat; /* original status of our tty */
 #endif
+#ifndef NO_SETOWNER_TTYDEV
   void privileges (rxvt_privaction action);
+  bool saved;
+#endif
 public:
   int pty; // pty file descriptor; connected to rxvt
   int tty; // tty file descriptor; connected to child
index 3e6f292cfc19902c9d41320fa377d901a220bf3a..d01ab948af15833439673156461e6f4e0bf3159c 100644 (file)
@@ -74,15 +74,6 @@ typedef struct {
 # define STDERR_FILENO  2
 #endif
 
-#if defined(HAVE_GRANTPT) && defined(HAVE_UNLOCKPT)
-# if defined(PTYS_ARE_GETPT) || defined(PTYS_ARE_PTMX)
-#  define NO_SETOWNER_TTYDEV 1
-# endif
-#endif
-#if defined(__CYGWIN32__)
-# define NO_SETOWNER_TTYDEV 1
-#endif
-
 /*
  *****************************************************************************
  * PROTOTYPES                    
index 66ae4bd313ee698459574069fa4ef50a7924cdeb..ac5ca8b795b62c73210ed0c69755aaab651bf166 100644 (file)
@@ -1,3 +1,3 @@
 // VERSION _must_ be \d.\d+
 #define VERSION "6.2"
-#define DATE   "2005-12-27"
+#define DATE   "2006-01-02"