diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2016-10-23 03:55:09 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2016-10-23 03:55:09 +0000 |
commit | 62458a93cc715f5d7aa39689bfef7256695af875 (patch) | |
tree | 6540a99fec6f649ba6b388113df4f0e7bfebd0d0 /net | |
parent | ad5bba915e851893268649c95d785a22ababe14b (diff) | |
download | ports-62458a93cc715f5d7aa39689bfef7256695af875.tar.gz ports-62458a93cc715f5d7aa39689bfef7256695af875.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/mosh/Makefile | 1 | ||||
-rw-r--r-- | net/mosh/files/patch-src_frontend_mosh-server.cc | 55 |
2 files changed, 56 insertions, 0 deletions
diff --git a/net/mosh/Makefile b/net/mosh/Makefile index 379cfbd4b097..0cb0f1377949 100644 --- a/net/mosh/Makefile +++ b/net/mosh/Makefile @@ -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/ diff --git a/net/mosh/files/patch-src_frontend_mosh-server.cc b/net/mosh/files/patch-src_frontend_mosh-server.cc new file mode 100644 index 000000000000..e82296f68ca7 --- /dev/null +++ b/net/mosh/files/patch-src_frontend_mosh-server.cc @@ -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 <mosh-devel@mit.edu>\n" ); ++ fprintf( stderr, "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\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 <mosh-devel@mit.edu>\n" ); +- fprintf( stderr, "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\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<int>(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). */ |