Some shell related questions

I'd be interested to hear people's opinions on the following:

  1. Should the package (and plugin) containing the commands 'test' (aka '['), 'true' and 'false' be renamed "org.jnode.shell.commands.posix"? It is currently named "org.jnode.shell.commands.unix", but the aim is to implement commands that behave as specified in the POSIX standards. (If it was up to me, all standard JNode commands would be POSIX compliant unless there is no equivalent, but some JNode developers want to retain JNode specific command syntaxes and behaviors; e.g. 'dir' and its DOS-like output format. Hence the need for a package for POSIX commands ...)
  2. Should "org.jnode.shell.commands.posix" be in the default plugin list?
  3. What should happen on JNode if a (classic Java) application calls System.exit(1)?

"Act accordingly"

I interpret "act accordingly" to mean that the application's own threads all stop and the shell it's run from receives the exit code passed to System.exit, while it does not actually shut down JNode itself.

Shutting down JNode would presumably be through the halt command, yes? Smiling

Answers

1. yes
2. yes
3. an arbitrary Java application should be started in a new isolate and it should act accordingly

Implemented 1) and 2)

... since I think they are a good idea too.

Behaviour of System.exit() on JNode

When you say "act accordingly", do you mean that System.exit should cause the isolate to exit?

What should happen if the System.exit() is called by something running in the root isolate? Presumably we don't want this to cause JNode to shut down ... or do we?

non-root isolates shouldn't be able to shutdown JNode

I think that only the root isolate should be able to shutdown JNode and, of course, it should be done according to permissions given to the calling plugin (as it's currently done with permission to do a 'System.exit()').

Fabien

my blog : en français, in english or both

System.exit() in root isolate

I think this should not shut down JNode.