summaryrefslogtreecommitdiff
path: root/support
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-05-14 04:27:18 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-05-14 04:27:18 +0000
commitf045d56d7989687fc49a80cf813131c574f88c7d (patch)
tree9a7b0ab64cace96fe3a47b4ff91d67063ad69d3e /support
parent71aed5cfc7dd41f63f5c5c2514f20ea0fe3752c7 (diff)
downloadhttpd-f045d56d7989687fc49a80cf813131c574f88c7d.tar.gz
Clarify the wintty purpose and syntax.
Still some todos: an option to just abort user feedback and close the window instantly upon loosing the stdin pipe, allow the stdin pipe to be tee'ed on win32, and still add some graceful error handling for a real-world deployment. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89110 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'support')
-rw-r--r--support/win32/wintty.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/support/win32/wintty.c b/support/win32/wintty.c
index 28c5979cce..6aad446cb4 100644
--- a/support/win32/wintty.c
+++ b/support/win32/wintty.c
@@ -71,14 +71,18 @@
#include <windows.h>
const char *options =
-"Syntax: wintty [opts] [-?]\n\n"
+"\nwintty: a utility for echoing the stdin stream to a new console window,\n"
+"\teven when invoked from within a service (such as the Apache server.)\n"
+"\tAlso reflects the console input back to the stdout stream, allowing\n"
+"\tthe operator to respond to prompts from the context of a service.\n\n"
+"Syntax: %s [opts]\n\n"
" opts: -c{haracter} or -l{ine} input\n"
"\t-q{uiet} or -e{cho} input\n"
-"\topts: -u{nprocessed} or -p{rocessed} input\n"
-"\topts: -n{owrap} or -w{rap} output lines\n"
-"\topts: -f{ormatted} or -r{aw} output lines\n"
-"\topts: -v{erbose} error checking\n"
-"\topts: -? for this message\n\n";
+"\t-u{nprocessed} or -p{rocessed} input\n"
+"\t-n{owrap} or -w{rap} output lines\n"
+"\t-f{ormatted} or -r{aw} output lines\n"
+"\t-v{erbose} error checking\n"
+"\t-? for this message\n\n";
HANDLE herrout;
BOOL verbose = FALSE;
@@ -112,6 +116,7 @@ int main(int argc, char** argv)
DWORD tid;
DWORD len;
BOOL isservice = FALSE;
+ char *arg0 = argv[0];
while (--argc) {
++argv;
@@ -145,7 +150,7 @@ int main(int argc, char** argv)
--argc;
break;
case '?':
- printf(options);
+ printf(options, arg0);
exit(1);
default:
printf("wintty option %s not recognized, use -? for help.\n\n", *argv);