Fix utmp and pty handling so that GTK never complains about running
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 16 Oct 2002 12:17:51 +0000 (12:17 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 16 Oct 2002 12:17:51 +0000 (12:17 +0000)
commit95c4783484b34f0e8865760a9527c7a6c971ab1d
tree9fe3658d7de12f21c66e2daaac40f51eb6716d5b
parentcae0c0233cb7c0180bfb7a5bca934b6e57805471
Fix utmp and pty handling so that GTK never complains about running
set[ug]id. All privs-requiring pty operations are done at the very
start of the run, then privs are dropped before initialising GTK.
Utmp is handled by forking a still-privileged subprocess at this
point, and later asking it (through a pipe) to stamp utmp. The
subprocess cleans up utmp on exit, which has the additional
advantage that if the main pterm process suffers some sort of
unexpected termination (up to and including SIGKILL) the subprocess
can still mop up utmp.

git-svn-id: svn://svn.tartarus.org/sgt/putty@2082 cda61777-01e9-0310-a592-d414129be87e
unix/pterm.c
unix/pty.c