Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-09 Thread Daniel Stone
Hi, On 8 April 2015 at 23:24, Bill Spitzak wrote: > On 04/08/2015 02:35 PM, Daniel Stone wrote: >> The best solution is to use strlcpy. >> >> If politics make that impossible, use snprintf(dest, len, "%s", src) >> which is exactly the same as strlcpy, including the return value! >>

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread Bill Spitzak
On 04/08/2015 02:35 PM, Daniel Stone wrote: The best solution is to use strlcpy. If politics make that impossible, use snprintf(dest, len, "%s", src) which is exactly the same as strlcpy, including the return value! (imagine that...) It's not the politics, it's that silently t

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread Daniel Stone
On Wednesday, April 8, 2015, Bill Spitzak wrote: > On 04/07/2015 05:03 PM, Bryce Harrington wrote: > >> I'm sure this is not going to ever be a problem since tty filenames and >> paths are on the short side, but since the tty string is an input >> parameter to this routine, it would be better def

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread Bill Spitzak
On 04/07/2015 05:03 PM, Bryce Harrington wrote: I'm sure this is not going to ever be a problem since tty filenames and paths are on the short side, but since the tty string is an input parameter to this routine, it would be better defensive programming to use strncpy. strncpy is not a fix and

RE: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread Potrola, MateuszX
Hi > On Wed, Apr 8, 2015 at 2:03 AM, Bryce Harrington > wrote: > > On Wed, Apr 01, 2015 at 08:10:44AM +0100, mateuszx.potr...@intel.com > wrote: > >> From: Mateusz Polrola > >> > >> After weston-launch is executing weston it cannot close TTY file, > >> because it is still required to properly ha

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread David Herrmann
Hi On Wed, Apr 8, 2015 at 2:03 AM, Bryce Harrington wrote: > On Wed, Apr 01, 2015 at 08:10:44AM +0100, mateuszx.potr...@intel.com wrote: >> From: Mateusz Polrola >> >> After weston-launch is executing weston it cannot close TTY file, >> because it is still required to properly handle SIGUSR1 and

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread Pekka Paalanen
David, would you happen to have a moment to look at this, please? Thanks, pq On Wed, 1 Apr 2015 08:10:44 +0100 mateuszx.potr...@intel.com wrote: > From: Mateusz Polrola > > After weston-launch is executing weston it cannot close TTY file, > because it is still required to properly handle SI

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-07 Thread Bryce Harrington
On Wed, Apr 01, 2015 at 08:10:44AM +0100, mateuszx.potr...@intel.com wrote: > From: Mateusz Polrola > > After weston-launch is executing weston it cannot close TTY file, > because it is still required to properly handle SIGUSR1 and SIGUSR2 > signals that are used for switching TTY. > > Additiona

[PATCH] weston-launch: Fixed TTY switching

2015-03-31 Thread mateuszx . potrola
From: Mateusz Polrola After weston-launch is executing weston it cannot close TTY file, because it is still required to properly handle SIGUSR1 and SIGUSR2 signals that are used for switching TTY. Additionally after opening TTY it has to be activated, so that user don't have to manually switch t