Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Nov 2009 21:50:08 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Jung-uk Kim <jkim@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r199418 - head/sys/dev/syscons
Message-ID:  <20091117195008.GH2331@deviant.kiev.zoral.com.ua>
In-Reply-To: <200911171434.56358.jkim@FreeBSD.org>
References:  <200911171924.nAHJOQIh032544@svn.freebsd.org> <200911171434.56358.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--qOvqZqNrf4y6v2y5
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 17, 2009 at 02:34:54PM -0500, Jung-uk Kim wrote:
> On Tuesday 17 November 2009 02:24 pm, Konstantin Belousov wrote:
> > Author: kib
> > Date: Tue Nov 17 19:24:26 2009
> > New Revision: 199418
> > URL: http://svn.freebsd.org/changeset/base/199418
> >
> > Log:
> >   Fix pgsignal() call after signature change in r199355.
> >
> >   Reported and tested by:	bf1783 googlemail com
> >   MFC after:	1 month
> >
> > Modified:
> >   head/sys/dev/syscons/scvidctl.c
> >
> > Modified: head/sys/dev/syscons/scvidctl.c
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- head/sys/dev/syscons/scvidctl.c	Tu=
e Nov 17 18:57:44
> > 2009	(r199417) +++ head/sys/dev/syscons/scvidctl.c	Tue Nov 17
> > 19:24:26 2009	(r199418) @@ -321,6 +321,7 @@
> > sc_set_pixel_mode(scr_stat *scp, struct return ENODEV;
> >  #else
> >      video_info_t info;
> > +    ksiginfo_t ksi;
> >      u_char *font;
> >      int prev_ysize;
> >      int error;
> > @@ -458,8 +459,11 @@ sc_set_pixel_mode(scr_stat *scp, struct
> >  	tp->t_winsize.ws_col =3D scp->xsize;
> >  	tp->t_winsize.ws_row =3D scp->ysize;
> >  	if (tp->t_pgrp !=3D NULL) {
> > +	    ksiginfo_init(&ksi);
> > +	    ksi.ksi_signo =3D SIGWINCH;
> > +	    ksi.ksi_code =3D SI_KERNEL;
> >  	    PGRP_LOCK(tp->t_pgrp);
> > -	    pgsignal(tp->t_pgrp, SIGWINCH, 1);
> > +	    pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
> >  	    PGRP_UNLOCK(tp->t_pgrp);
> >  	}
> >      }
>=20
> Probably you wanted this:
>=20
> --- sys/dev/syscons/scvidctl.c
> +++ sys/dev/syscons/scvidctl.c
> @@ -321,7 +321,6 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
>      return ENODEV;
>  #else
>      video_info_t info;
> -    ksiginfo_t ksi;
>      u_char *font;
>      int prev_ysize;
>      int error;
> @@ -458,14 +457,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, i
>         || tp->t_winsize.ws_row !=3D scp->ysize) {
>         tp->t_winsize.ws_col =3D scp->xsize;
>         tp->t_winsize.ws_row =3D scp->ysize;
> -       if (tp->t_pgrp !=3D NULL) {
> -           ksiginfo_init(&ksi);
> -           ksi.ksi_signo =3D SIGWINCH;
> -           ksi.ksi_code =3D SI_KERNEL;
> -           PGRP_LOCK(tp->t_pgrp);
> -           pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi);
> -           PGRP_UNLOCK(tp->t_pgrp);
> -       }
> +
> +       tty_signal_pgrp(tp, SIGWINCH);
>      }
> =20
>      return 0;
> ------------------------------------------------------------------
>=20
> In fact, it seems it was missed in r181905.
>=20
> Jung-uk Kim

I do not think so, at least it needs further considerations.
First, call to tty_signal_pgrp() requires locked tty.
Second, tty_signal_pgrp() restores i/o processing on the terminal,
	tp->t_flags &=3D ~TF_STOPPED;
that is not quite obviously right thing to do on SIGWINCH.


--qOvqZqNrf4y6v2y5
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (FreeBSD)

iEYEARECAAYFAksC/nAACgkQC3+MBN1Mb4hrnQCfbyLMUGGuI4ZwzECtvsXyVd2e
Gd0Anil753cThd7joNwmYP/Od/uGBSAc
=BpuX
-----END PGP SIGNATURE-----

--qOvqZqNrf4y6v2y5--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091117195008.GH2331>