From owner-svn-ports-all@freebsd.org Sun Oct 23 03:55:11 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BEF2C13D5D; Sun, 23 Oct 2016 03:55:11 +0000 (UTC) (envelope-from zi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5B816C8; Sun, 23 Oct 2016 03:55:10 +0000 (UTC) (envelope-from zi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9N3t9cP073825; Sun, 23 Oct 2016 03:55:09 GMT (envelope-from zi@FreeBSD.org) Received: (from zi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9N3t9TO073823; Sun, 23 Oct 2016 03:55:09 GMT (envelope-from zi@FreeBSD.org) Message-Id: <201610230355.u9N3t9TO073823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zi set sender to zi@FreeBSD.org using -f From: Ryan Steinmetz Date: Sun, 23 Oct 2016 03:55:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r424493 - in head/net/mosh: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2016 03:55:11 -0000 Author: zi Date: Sun Oct 23 03:55:09 2016 New Revision: 424493 URL: https://svnweb.freebsd.org/changeset/ports/424493 Log: - Fix connect under 11.x Obtained from: upstream: 4ad131a55d5a82a044a0c62428d6a488a97b46bf Added: head/net/mosh/files/ head/net/mosh/files/patch-src_frontend_mosh-server.cc (contents, props changed) Modified: head/net/mosh/Makefile Modified: head/net/mosh/Makefile ============================================================================== --- head/net/mosh/Makefile Sun Oct 23 00:02:02 2016 (r424492) +++ head/net/mosh/Makefile Sun Oct 23 03:55:09 2016 (r424493) @@ -3,6 +3,7 @@ PORTNAME= mosh PORTVERSION= 1.2.6 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://mosh.mit.edu/ \ http://mirrors.rit.edu/zi/ Added: head/net/mosh/files/patch-src_frontend_mosh-server.cc ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/mosh/files/patch-src_frontend_mosh-server.cc Sun Oct 23 03:55:09 2016 (r424493) @@ -0,0 +1,55 @@ +--- src/frontend/mosh-server.cc.orig 2016-08-10 10:58:28 UTC ++++ src/frontend/mosh-server.cc +@@ -409,7 +409,6 @@ static int run_server( const char *desir + } + + printf( "\nMOSH CONNECT %s %s\n", network->port().c_str(), network->get_key().c_str() ); +- fflush( stdout ); + + /* don't let signals kill us */ + struct sigaction sa; +@@ -421,25 +420,34 @@ static int run_server( const char *desir + + + /* detach from terminal */ ++ fflush( stdout ); ++ fflush( stderr ); + pid_t the_pid = fork(); + if ( the_pid < 0 ) { + perror( "fork" ); + } else if ( the_pid > 0 ) { +- _exit( 0 ); +- } ++ fprintf( stderr, "\nmosh-server (%s) [build %s]\n", PACKAGE_STRING, BUILD_VERSION ); ++ fprintf( stderr, "Copyright 2012 Keith Winstein \n" ); ++ fprintf( stderr, "License GPLv3+: GNU GPL version 3 or later .\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n" ); + +- fprintf( stderr, "\nmosh-server (%s) [build %s]\n", PACKAGE_STRING, BUILD_VERSION ); +- fprintf( stderr, "Copyright 2012 Keith Winstein \n" ); +- fprintf( stderr, "License GPLv3+: GNU GPL version 3 or later .\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n" ); ++ fprintf( stderr, "[mosh-server detached, pid = %d]\n", static_cast(the_pid) ); ++#ifndef HAVE_IUTF8 ++ fprintf( stderr, "\nWarning: termios IUTF8 flag not defined.\nCharacter-erase of multibyte character sequence\nprobably does not work properly on this platform.\n" ); ++#endif /* HAVE_IUTF8 */ + +- fprintf( stderr, "[mosh-server detached, pid = %d]\n", (int)getpid() ); ++ fflush( stdout ); ++ fflush( stderr ); ++ if ( isatty( STDOUT_FILENO ) ) { ++ tcdrain( STDOUT_FILENO ); ++ } ++ if ( isatty( STDERR_FILENO ) ) { ++ tcdrain( STDERR_FILENO ); ++ } ++ _exit( 0 ); ++ } + + int master; + +-#ifndef HAVE_IUTF8 +- fprintf( stderr, "\nWarning: termios IUTF8 flag not defined.\nCharacter-erase of multibyte character sequence\nprobably does not work properly on this platform.\n" ); +-#endif /* HAVE_IUTF8 */ +- + /* close file descriptors */ + if ( !verbose ) { + /* Necessary to properly detach on old versions of sshd (e.g. RHEL/CentOS 5.0). */