From efc2799f3408ede20770af24f861f6d1c349fbc9 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 4 Aug 1995 05:04:06 +0000 Subject: [PATCH] * cleanup.c (pty_cleanup): Add missing declarations for retval and fd. Also, align preprocessor directives with left margin. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6406 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/pty/ChangeLog | 5 +++++ src/util/pty/cleanup.c | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/util/pty/ChangeLog b/src/util/pty/ChangeLog index a8aa1cbef..58bb11c3a 100644 --- a/src/util/pty/ChangeLog +++ b/src/util/pty/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 4 00:59:20 1995 Tom Yu + + * cleanup.c (pty_cleanup): Add missing declarations for retval and + fd. Also, align preprocessor directives with left margin. + Thu Aug 3 15:04:34 1995 Sam Hartman * configure.in: Check for vhangup and killpg. diff --git a/src/util/pty/cleanup.c b/src/util/pty/cleanup.c index c5726bd6f..8d4463b27 100644 --- a/src/util/pty/cleanup.c +++ b/src/util/pty/cleanup.c @@ -29,6 +29,7 @@ long pty_cleanup (slave, pid, update_utmp) int update_utmp; { struct utmp ut; + int retval, fd; #ifndef NO_UT_PID ut.ut_pid = 0; @@ -55,17 +56,18 @@ long pty_cleanup (slave, pid, update_utmp) * along SIGHUP, all processes may not die. */ if ( pid > 0 ) { - #ifdef HAVE_KILLPG +#ifdef HAVE_KILLPG killpg(pid, SIGHUP); - #else +#else kill( -(pid), SIGHUP ); #endif /*HAVE_KILLPG*/ } #else /* HAVE_REVOKE*/ - #ifdef VHANG_LAST +#ifdef VHANG_LAST if ( retval = ( pty_open_ctty( slave, &fd ))) return retval; ptyint_vhangup(); + return 0; #endif #endif } -- 2.26.2