Index: head/net/mosh/Makefile =================================================================== --- head/net/mosh/Makefile (revision 424492) +++ head/net/mosh/Makefile (revision 424493) @@ -1,30 +1,31 @@ # Created by: Ryan Steinmetz # $FreeBSD$ PORTNAME= mosh PORTVERSION= 1.2.6 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://mosh.mit.edu/ \ http://mirrors.rit.edu/zi/ MAINTAINER= zi@FreeBSD.org COMMENT= Mobile terminal that supports intermittent connectivity LICENSE= GPLv3 LIB_DEPENDS= libprotobuf.so:devel/protobuf USE_PERL5= run GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-utempter --without-ncurses CONFIGURE_ENV+= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lssl -lcrypto" \ TINFO_CFLAGS="-I/usr/include" INSTALL_TARGET= install-strip USES= autoreconf:autoconf ncurses perl5 pkgconfig ssl CONFLICTS_INSTALL= mosh-0.[2-9].* PLIST_FILES= bin/mosh bin/mosh-server bin/mosh-client \ man/man1/mosh-client.1.gz man/man1/mosh-server.1.gz man/man1/mosh.1.gz .include Index: head/net/mosh/files/patch-src_frontend_mosh-server.cc =================================================================== --- head/net/mosh/files/patch-src_frontend_mosh-server.cc (nonexistent) +++ head/net/mosh/files/patch-src_frontend_mosh-server.cc (revision 424493) @@ -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). */ Property changes on: head/net/mosh/files/patch-src_frontend_mosh-server.cc ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property