Gsh Errors
gsh tries, when an error occurs, to
output an informative error message that will lead you to the
solution of your problem. This appendix documents all gsh
error messages and what the probable cause of the problem might
be. There are five classes of errors: generic gsh, command-entry,
syntax, execution, and builtin. Each error is discussed
separately.
Generic gsh Errors
These errors can typically occur at any
time and may not be directly related to something the user has
done. Some of them are trivial, and some are very serious and
should be reported immediately via the
GNOBugs
web page.
gsh: There are stopped jobs.
All stopped jobs must be killed before exiting the
shell. Use the jobs and kill commands.
Command Editing Errors
Command editing errors occur when entering
information on the command-line. If you try to move the cursor
too far to the left or right of your command-line (i.e. before
the first character or after the last character), an error will
occur. At present, gsh indicates a command-entry error by generating
the bell character (^G), which beeps the speaker.
This is to notify you that the action you requested is not possible.
Syntax Errors
Syntax errors occur while gsh is trying to
understand the command you have entered on the command-line.
Problems arise when you wish to quote an argument (") and
only enter one quote.
gsh: Missing ending ".
A second " wasn't supplied when quoting text.
gsh: Missing ending '.
A second ' wasn't supplied when quoting text.
gsh: Too many arguments, so no dessert tonight.
The command-line contained too many arguments which exceeded the available
memory allocated by gsh.
gsh: Not enough memory for arguments.
No memory was available for allocating command-line arguments.
gsh: Extra '<' encountered.
gsh: Extra '>' or '>>' encountered.
gsh: Extra '>&' or '>>&' encountered
Text may be redirected to only one file.
gsh: No file specified for '<'.
gsh: No file specified for '>' or '>>'.
gsh: No file specified for '>&' or '>>&'.
A file must be specified when redirecting I/O.
gsh: '|' conflicts with '>' or '>>'.
gsh: '|' conflicts with '<'.
Piping is another form of redirection, thus
pipes and redirections cannot be mixed.
Execution Errors
After gsh parses the command-line,
it will then execute the command and pass any arguments to the
command. If, however, the command does not exist, gsh will
report an error. The reason the command does not exist could be
either the command name was typed wrong or the command does not
exist.
$0: Command not found.
$0 represents the command to be executed.
Either the command name was entered incorrectly or the command
does not exist. Recheck the spelling of the command and check
$PATH to make sure the command exists in the pathname list.
$0: Not executable.
$0 represents the command to be executed. Check to ensure that the
filetype is correct.
heh heh, next time you'll need to specify a command before redirecting.
Redirection was specified but the command-line had no command.
Cannot fork (too many processes?)
An error was encountered forking a process.
The most likely culprit is there are too many processes running.
Builtin Command Errors
These are errors which can be returned by
many of the builtin commands. Every builtin also contains a
usage message on the proper invocation method.
cd: Not a directory
Tried to change the cwd to a file that isn't a directory.
prefix: could not set prefix, pathname may not exist.
GS/OS Prefix command failed, most likely
the pathname did not exist or the disk is damaged.
setdebug: Unknown flag
An unknown flag was sent to
setdebug. Run
setdebug with
no arguments for a list of possible flags.
ps: error in kvm_open()
ps was unable to access the process data
structure. If the kernel data structures are damaged to the point that
this error occurs, it is likely that you will not be able to see this
error.
set: Variable not specified
A variable was not passed to set, for example,
"set =bar".
Make sure the variable name was specified
without the preceding dollar sign. For example, if foo is not
set, then
"set $foo=bar"
would be expanded to
"set =bar",
resulting in this error.
kill: Invalid signal number
kill: Invalid signal name
See the signal(2) manual page for a list of valid signal names and numbers.
fg: No job to foreground.
bg: No job to background.
stop: No job to stop.
There aren't currently any jobs so the attempted command is useless.
fg: No such job.
bg: No such job.
stop: No such job.
kill: No such job.
The specified job (or process) doesn't exist.
fg: Gee, this job is already in the foreground.
bg: Gee, this job is already in the background.
stop: Gee, this job is already stopped.
Well, this should be self-explanatory.
Also, some of these should be impossible to get, unless you're
bound and determined to crash gsh, but then, these errors will
keep you from crashing it, so, what's the point?