Hi,
Quite frankly to have an application stopped by the same command that stops
your OS
is dangerious. Over the years I have been bitten by this sort of buglet a few
times...
Ed
On Friday 12 May 2006 09:18, David Sowder (Zothar) wrote:
> Ed Tomlinson wrote:
> > HI
> >
> > Please revert this.
> >
> > its OK that quit exits in TCMI. Its not a problem. Its a good thing.
> >
> > This fix just confuses things.
> >
> > Its not a good idea.
> >
> And I would argue the opposite. QUIT should not mean different things
> in different contexts if we can easily help it. Different meanings
> leads to use out of habit giving you a result you didn't expect, in this
> case it would be node shutdown. Imagine using the socket interface a
> lot and then using the direct console for some reason, typing QUIT and
> going to lunch; your node would be shutdown unintentionally until you
> noticed at some point. Obviously, this is up for discussion in the
> group, but I'm unclear how this change confuses anything.
>
> Admittedly, QUIT used to be the command to shutdown in either
> environment, but that was changed a couple of weeks ago and I believe
> the current arrangement is much more logical and consistent with other
> applications.
> > On Thursday 11 May 2006 22:43, zothar at freenetproject.org wrote:
> >
> >> Author: zothar
> >> Date: 2006-05-12 02:43:18 +0000 (Fri, 12 May 2006)
> >> New Revision: 8672
> >>
> >> Modified:
> >> trunk/freenet/src/freenet/node/Node.java
> >> trunk/freenet/src/freenet/node/TextModeClientInterface.java
> >> Log:
> >> This should make a few interface elements more consistent: 'QUIT' just
> >> plain isn't a command in direct TMCI console mode rather than having a
> >> different meaning there than on a network socket, display the running
> >> node's build number and SVN revision number consistently everywhere (and
> >> now also in the logs on start up).
> >>
> >> Modified: trunk/freenet/src/freenet/node/Node.java
> >> ===================================================================
> >> --- trunk/freenet/src/freenet/node/Node.java 2006-05-11 22:32:42 UTC
> >> (rev 8671)
> >> +++ trunk/freenet/src/freenet/node/Node.java 2006-05-12 02:43:18 UTC
> >> (rev 8672)
> >> @@ -1226,6 +1226,8 @@
> >> ps.start();
> >> usm.start();
> >>
> >> + Logger.normal(this, "Freenet 0.7 Build #"+Version.buildNumber()+"
> >> r"+Version.cvsRevision);
> >> + System.out.println("Freenet 0.7 Build #"+Version.buildNumber()+"
> >> r"+Version.cvsRevision);
> >> // Start services
> >>
> >> // TMCI
> >>
> >> Modified: trunk/freenet/src/freenet/node/TextModeClientInterface.java
> >> ===================================================================
> >> --- trunk/freenet/src/freenet/node/TextModeClientInterface.java
> >> 2006-05-11 22:32:42 UTC (rev 8671)
> >> +++ trunk/freenet/src/freenet/node/TextModeClientInterface.java
> >> 2006-05-12 02:43:18 UTC (rev 8672)
> >> @@ -123,9 +123,9 @@
> >> private void printHeader(OutputStream s) throws IOException {
> >> StringBuffer sb = new StringBuffer();
> >>
> >> - sb.append("Freenet 0.7 Trivial Node Test Interface\r\n");
> >> + sb.append("Trivial Text Mode Client Interface\r\n");
> >> sb.append("---------------------------------------\r\n");
> >> - sb.append("Build "+Version.buildNumber()+" - "+
> >> Version.cvsRevision+"\r\n");
> >> + sb.append("Freenet 0.7 Build #"+Version.buildNumber()+"
> >> r"+Version.cvsRevision+"\r\n");
> >> sb.append("Enter one of the following commands:\r\n");
> >> sb.append("GET:<Freenet key> - Fetch a key\r\n");
> >> sb.append("PUT:\r\n<text, until a . on a line by itself> - Insert
> >> the document and return the key.\r\n");
> >> @@ -155,7 +155,9 @@
> >> // sb.append("SAY:<text> - send text to the last created/pushed
> >> stream\r\n");
> >> sb.append("STATUS - display some status information on the node
> >> including its reference and connections.\r\n");
> >> sb.append("SHUTDOWN - exit the program\r\n");
> >> - sb.append("QUIT - close the socket\r\n");
> >> + if(n.directTMCI != this) {
> >> + sb.append("QUIT - close the socket\r\n");
> >> + }
> >> if(n.testnetEnabled) {
> >> sb.append("WARNING: TESTNET MODE ENABLED. YOU HAVE NO
> >> ANONYMITY.\r\n");
> >> }
> >> @@ -293,12 +295,18 @@
> >> if(e.newURI != null)
> >> outsb.append("Permanent redirect:
> >> "+e.newURI+"\r\n");
> >> }
> >> - } else if(uline.startsWith("SHUTDOWN")||(uline.startsWith("QUIT") &&
> >> n.directTMCI == this)) {
> >> + } else if(uline.startsWith("SHUTDOWN")) {
> >> StringBuffer sb = new StringBuffer();
> >> sb.append("Shutting node down.\r\n");
> >> out.write(sb.toString().getBytes());
> >> out.flush();
> >> n.exit();
> >> + } else if(uline.startsWith("QUIT") && n.directTMCI == this) {
> >> + StringBuffer sb = new StringBuffer();
> >> + sb.append("QUIT command not available in console mode.\r\n");
> >> + out.write(sb.toString().getBytes());
> >> + out.flush();
> >> + return false;
> >> } else if(uline.startsWith("QUIT")) {
> >> StringBuffer sb = new StringBuffer();
> >> sb.append("Closing connection.\r\n");
> >>
> _______________________________________________
> Devl mailing list
> Devl at freenetproject.org
> http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
>
>