From 5bffe5e4528e109b346f6dd9128176df912ff4e8 Mon Sep 17 00:00:00 2001 From: james <> Date: Wed, 12 Mar 2008 01:26:56 +0000 Subject: *** empty log message *** --- apps/sympathy.c | 12 ++++++++++-- apps/usage.c | 6 ++++++ src/ptty.c | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/apps/sympathy.c b/apps/sympathy.c index c14b8ec..b19cb94 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.43 2008/03/12 01:26:56 james + * *** empty log message *** + * * Revision 1.42 2008/03/11 15:02:52 james * *** empty log message *** * @@ -201,7 +204,7 @@ sigchld (int dummy) wait3 (&status, WNOHANG, NULL); } -/* Dispell zombies, from for example log compression */ +/* Dispell zombies, from, for example, log compression */ void garlic (void) { @@ -717,7 +720,12 @@ main (int argc, char *argv[]) } if (oflags['p']) { - ctx->t = ptty_open (NULL, NULL, &size); + if (optind 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"); } else { diff --git a/apps/usage.c b/apps/usage.c index cbf3a09..54956cf 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.23 2008/03/12 01:26:56 james + * *** empty log message *** + * * Revision 1.22 2008/03/07 13:16:02 james * *** empty log message *** * @@ -88,10 +91,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" "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" "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" "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 000587b..fe4c930 100644 --- a/src/ptty.c +++ b/src/ptty.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.22 2008/03/12 01:26:56 james + * *** empty log message *** + * * Revision 1.21 2008/03/10 11:49:33 james * *** empty log message *** * @@ -192,7 +195,11 @@ ptty_open (char *path, char *argv[], CRT_Pos * size) if (!argv) argv = default_argv; - execv (path, argv); + if (path[0]=='/') + execv (path, argv); + else + execvp (path, argv); + _exit (-1); } -- cgit v1.2.3