Use ptsname_r instead of ptsname in logwrapper.

Also other misc suggestions and fixes from Markus' review.

Bug: 3017876
Change-Id: I503f0340c2d75afb6850e36c1586f7f495638036
1 file changed