From owner-svn-src-head@FreeBSD.ORG Tue Nov 17 20:01:04 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 1BB0E1065670; Tue, 17 Nov 2009 20:01:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Kostik Belousov Date: Tue, 17 Nov 2009 15:00:49 -0500 User-Agent: KMail/1.6.2 References: <200911171924.nAHJOQIh032544@svn.freebsd.org> <200911171434.56358.jkim@FreeBSD.org> <20091117195008.GH2331@deviant.kiev.zoral.com.ua> In-Reply-To: <20091117195008.GH2331@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200911171500.52995.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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Nov 2009 20:01:04 -0000 On Tuesday 17 November 2009 02:50 pm, Kostik Belousov wrote: > 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 > > > =============================================================== > > >==== =========== --- head/sys/dev/syscons/scvidctl.c Tue 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 = scp->xsize; > > > tp->t_winsize.ws_row = scp->ysize; > > > if (tp->t_pgrp != NULL) { > > > + ksiginfo_init(&ksi); > > > + ksi.ksi_signo = SIGWINCH; > > > + ksi.ksi_code = 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); > > > } > > > } > > > > Probably you wanted this: > > > > --- 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 != scp->ysize) { > > > > tp->t_winsize.ws_col = scp->xsize; > > tp->t_winsize.ws_row = scp->ysize; > > - if (tp->t_pgrp != NULL) { > > - ksiginfo_init(&ksi); > > - ksi.ksi_signo = SIGWINCH; > > - ksi.ksi_code = SI_KERNEL; > > - PGRP_LOCK(tp->t_pgrp); > > - pgsignal(tp->t_pgrp, SIGWINCH, 1, &ksi); > > - PGRP_UNLOCK(tp->t_pgrp); > > - } > > + > > + tty_signal_pgrp(tp, SIGWINCH); > > } > > > > return 0; > > ----------------------------------------------------------------- > >- > > > > In fact, it seems it was missed in r181905. > > > > 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 &= ~TF_STOPPED; > that is not quite obviously right thing to do on SIGWINCH. If so, r181905 is wrong, too: http://svn.freebsd.org/viewvc/base/head/sys/dev/syscons/scvidctl.c?r1=181905&r2=181904&pathrev=181905 Jung-uk Kim