From 236863f163db6a700db2d2ea780688f20c00d316 Mon Sep 17 00:00:00 2001 From: james <> Date: Wed, 12 Mar 2008 01:30:23 +0000 Subject: *** empty log message *** --- apps/sympathy.c | 13 ++++++++----- apps/usage.c | 9 ++++++--- src/ptty.c | 11 +++++++---- src/terminal.c | 4 ++++ sympathy.1 | 16 ++++++++++++---- version-md5sums | 1 + version-micro | 2 +- version-stamps | 1 + 8 files changed, 40 insertions(+), 17 deletions(-) diff --git a/apps/sympathy.c b/apps/sympathy.c index b19cb94..5cb7e16 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.44 2008/03/12 01:30:23 james + * *** empty log message *** + * * Revision 1.43 2008/03/12 01:26:56 james * *** empty log message *** * @@ -720,11 +723,11 @@ main (int argc, char *argv[]) } if (oflags['p']) { - if (optind t = ptty_open (argv[optind], &argv[optind], &size); - } else { - ctx->t = ptty_open (NULL, NULL, &size); - } + if (optind < argc) { + ctx->t = ptty_open (argv[optind], &argv[optind], &size); + } else { + ctx->t = ptty_open (NULL, NULL, &size); + } if (!ctx->t) fatal_moan ("unable to open a ptty"); diff --git a/apps/usage.c b/apps/usage.c index 54956cf..2f9667b 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.24 2008/03/12 01:30:23 james + * *** empty log message *** + * * Revision 1.23 2008/03/12 01:26:56 james * *** empty log message *** * @@ -91,13 +94,13 @@ usage (void) fprintf (stderr, "Usage:\n" "sympathy -t [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-w WxH]\n" " [-F] [-P pidfile] [-u] [-N]\n" - " [pty program] [pty program args]\n" + " [pty program] [pty program args]\n" "sympathy -s [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-w WxH]\n" " [-F] [-P pidfile] [-n hlines] [-k skt]\n" - " [pty program] [pty program args]\n" + " [pty program] [pty program args]\n" "sympathy [-s -c] [-K] [-d serialdev|-p] [-b baud] [-f] [-L log] [-w WxH]\n" " [-F] [-P pidfile] [-u] [-N] [-n hlines] [-k skt]\n" - " [pty program] [pty program args]\n" + " [pty program] [pty program args]\n" "sympathy -c [-H] [-I string ] [-u] [-N] -k skt\n" "sympathy -r id [-H] [-I string ] [-u] [-N]\n" "sympathy {-l|-ls}\n" diff --git a/src/ptty.c b/src/ptty.c index fe4c930..53252a2 100644 --- a/src/ptty.c +++ b/src/ptty.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.23 2008/03/12 01:30:23 james + * *** empty log message *** + * * Revision 1.22 2008/03/12 01:26:56 james * *** empty log message *** * @@ -195,10 +198,10 @@ ptty_open (char *path, char *argv[], CRT_Pos * size) if (!argv) argv = default_argv; - if (path[0]=='/') - execv (path, argv); - else - execvp (path, argv); + if (path[0] == '/') + execv (path, argv); + else + execvp (path, argv); _exit (-1); } diff --git a/src/terminal.c b/src/terminal.c index f86154d..9f02a76 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.23 2008/03/12 01:30:23 james + * *** empty log message *** + * * Revision 1.22 2008/03/11 17:56:50 james * *** empty log message *** * @@ -152,6 +155,7 @@ terminal_close (TTY * _t) // // // + // // to // bottom t->xmit (_t, buf, i); diff --git a/sympathy.1 b/sympathy.1 index 43a8b88..c76ef20 100644 --- a/sympathy.1 +++ b/sympathy.1 @@ -162,9 +162,13 @@ as an argument to the \fIconsole\fP kernel parameter. The \-\fBd\fP option is incompatible with the \-\fBp\fP option. .TP 5 .B \-p -connect to a pseudo-tty instead of a terminal device, and fork a login shell in +connect to a pseudo\-tty instead of a terminal device, and fork a login shell in it. The \-\fBp\fP option is incompatible with the \-\fBd\fP option. This is the default -terminal device if none is specified. +terminal device if none is specified. The first non\-option command line +arugment is considered to be the a binary to run in the pseudo\-tty, subsequent +arguments are parsed to the binary. The current value of PATH is searched for +the binary if it does not start with '/'. If no binary is specified +then '/bin/sh' is called with \fIargv[0]\fP set to '\-'. .TP 5 .B \-K lock the terminal device specified in the \-\fBd\fP option. @@ -173,8 +177,9 @@ generates lock files in a staggering variety of formats and places. For locks based on the name of the device .I sympathy generates lock files for all devices -with the same major and minor in /dev, /dev/usb and /dev/tts, it uses both normal -and lower case and replaces occurrences of `/' in the device name with both `.' and `_'. +with the same major and minor in /dev, /dev/usb and /dev/tts, it uses both +normal and lower case and replaces occurrences of `/' in the device name with +both `.' and `_'. .I Sympathy also generates locks based on the device major and minor numbers, and for all lock file names generates them in any of the following directories that are writable: @@ -530,6 +535,9 @@ sets the value of \fBTERM\fP in pseudo-ttys spawned using the .I Sympathy will use \fBCSI ] 0 ;\fP to set the window title to the name of the socket or device if \fBTERM\fP starts with \fIxterm\fP or \fIrxvt\fP. +.br +The \fBPATH\fP enviroment variable is searched for the binary to be run +in the pseudo\-tty. .SH EMULATION .I Sympathy completely emulates a VT102 terminal (including the VT52 emulation). diff --git a/version-md5sums b/version-md5sums index a178396..6a02caf 100644 --- a/version-md5sums +++ b/version-md5sums @@ -16,3 +16,4 @@ a5ee6f647e6d98d5f06b75a70b7bf9a5 1.1.9 0c169eaf189eb8f9b375254b69e63c31 1.1.12 9422541c5f11969d68f1e995925f0ef5 1.1.13 b86aca610f6f0763d7ad9ee4d8390c03 1.2.0 +6d5eefa9b04abaf2343677005de951de 1.2.1 diff --git a/version-micro b/version-micro index 573541a..d00491f 100644 --- a/version-micro +++ b/version-micro @@ -1 +1 @@ -0 +1 diff --git a/version-stamps b/version-stamps index de8da33..76899a4 100644 --- a/version-stamps +++ b/version-stamps @@ -9,3 +9,4 @@ a5ee6f647e6d98d5f06b75a70b7bf9a5 "February 28, 2008" 0c169eaf189eb8f9b375254b69e63c31 "March 03, 2008" 9422541c5f11969d68f1e995925f0ef5 "March 07, 2008" b86aca610f6f0763d7ad9ee4d8390c03 "March 11, 2008" +6d5eefa9b04abaf2343677005de951de "March 12, 2008" -- cgit v1.2.3