diff options
-rw-r--r-- | apps/sympathy.c | 14 | ||||
-rw-r--r-- | apps/usage.c | 8 | ||||
-rw-r--r-- | sympathy.1 | 5 |
3 files changed, 23 insertions, 4 deletions
diff --git a/apps/sympathy.c b/apps/sympathy.c index 7821ce5..c85bdae 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.47 2008/05/09 12:26:58 staffcvs + * *** empty log message *** + * * Revision 1.46 2008/05/09 12:19:18 james * *** empty log message *** * @@ -164,10 +167,13 @@ static char rcsid[] = #include <fcntl.h> #include <sys/resource.h> #include <sys/wait.h> +#include <syslog.h> #include "mainloop.h" +int use_syslog=0; + extern void usage (void); extern char *expand (const char *, int *); static char hostname[1024]; @@ -652,6 +658,10 @@ main (int argc, char *argv[]) fatal_moan ("-c or -r are incompatible with -p, -d, -K, -b, -f, -R, -P or -L"); + if (oflags['C'] || !oflags['d']) + fatal_moan("-C requires -d"); + + if (oflags['t'] || oflags['s']) { if (!oflags['p'] && !oflags['d']) oflags['p']++; @@ -714,7 +724,7 @@ main (int argc, char *argv[]) } - if (oflags['s'] || oflags['t']) { + if (oflags['s'] || oflags['t'] || oflags['C']) { if (oflags['P']) { FILE *fp; pid_file = oargs['P']; @@ -774,7 +784,7 @@ main (int argc, char *argv[]) fatal_moan ("unable to open serial port %s", oargs['d']); if (oflags['C']) { - serial_close(ctx->t); + ctx->t->close(ctx->t); return 0; } } diff --git a/apps/usage.c b/apps/usage.c index 88f844a..3715916 100644 --- a/apps/usage.c +++ b/apps/usage.c @@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.26 2008/05/09 12:26:58 staffcvs + * *** empty log message *** + * * Revision 1.25 2008/05/09 12:19:18 james * *** empty log message *** * @@ -100,10 +103,10 @@ usage (void) " [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" + " [-S] [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" + " [-S] [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 -C -d serialdev\n" @@ -152,6 +155,7 @@ usage (void) " server, that are replayed on connexion\n" " -P pidfile write the pid of the server/terminal process to pidfile\n" " -R rotate logile specified with -L option\n" + " -S log errors to syslog\n" " -u don't emit utf-8 try to use ISO-2202 to the local terminal\n" " -w W[xH] start session with a screen of size W by H. 0<W<=132,\n" " 0<H<24, default 80 by 24\n" @@ -284,6 +284,11 @@ socket in ~/.sympathy, creating that directory if necessary, and named .I sympathy process that created the socket. .TP 5 +.B \-S +tells the +.I sympathy +server process to log errors to syslog. +.TP 5 .B \-F tells the .I sympathy |