Commit ec39d655 authored by Bill Medland's avatar Bill Medland Committed by Alexandre Julliard

Added a version option to the wineserver.

parent 84ff5dde
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include "config.h"
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
#include <fcntl.h> #include <fcntl.h>
...@@ -49,11 +51,12 @@ static void usage(void) ...@@ -49,11 +51,12 @@ static void usage(void)
fprintf(stderr, "\nusage: %s [options]\n\n", server_argv0); fprintf(stderr, "\nusage: %s [options]\n\n", server_argv0);
fprintf(stderr, "options:\n"); fprintf(stderr, "options:\n");
fprintf(stderr, " -d<n> set debug level to <n>\n"); fprintf(stderr, " -d<n> set debug level to <n>\n");
fprintf(stderr, " -p[n] make server persistent, optionally for n seconds\n");
fprintf(stderr, " -f remain in the foreground for debugging\n"); fprintf(stderr, " -f remain in the foreground for debugging\n");
fprintf(stderr, " -w wait until the current wineserver terminates\n");
fprintf(stderr, " -k[n] kill the current wineserver, optionally with signal n\n");
fprintf(stderr, " -h display this help message\n"); fprintf(stderr, " -h display this help message\n");
fprintf(stderr, " -k[n] kill the current wineserver, optionally with signal n\n");
fprintf(stderr, " -p[n] make server persistent, optionally for n seconds\n");
fprintf(stderr, " -v display version information and exit\n");
fprintf(stderr, " -w wait until the current wineserver terminates\n");
fprintf(stderr, "\n"); fprintf(stderr, "\n");
} }
...@@ -79,17 +82,20 @@ static void parse_args( int argc, char *argv[] ) ...@@ -79,17 +82,20 @@ static void parse_args( int argc, char *argv[] )
usage(); usage();
exit(0); exit(0);
break; break;
case 'k':
if (isdigit(argv[i][2])) ret = kill_lock_owner( atoi(argv[i] + 2) );
else ret = kill_lock_owner(-1);
exit( !ret );
case 'p': case 'p':
if (isdigit(argv[i][2])) master_socket_timeout = atoi( argv[i] + 2 ); if (isdigit(argv[i][2])) master_socket_timeout = atoi( argv[i] + 2 );
else master_socket_timeout = -1; else master_socket_timeout = -1;
break; break;
case 'v':
fprintf( stderr, "%s\n", PACKAGE_STRING );
exit(0);
case 'w': case 'w':
wait_for_lock(); wait_for_lock();
exit(0); exit(0);
case 'k':
if (isdigit(argv[i][2])) ret = kill_lock_owner( atoi(argv[i] + 2) );
else ret = kill_lock_owner(-1);
exit( !ret );
default: default:
fprintf( stderr, "wineserver: unknown option '%s'\n", argv[i] ); fprintf( stderr, "wineserver: unknown option '%s'\n", argv[i] );
usage(); usage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment