Carl Lowenstein wrote:
On 6/23/06, jerry <[EMAIL PROTECTED]> wrote:
As i understand it after running a command running "echo $?" will
respond with 0 if the command executed properly and any other number if
there were an error.

I keep getting the response 130; obviously an error. Where can i find a
list  of error codes on linux?

Unfortunately there is no such thing.  Exit code 0 for success, non-0
for failure.  Some programs have documented exit codes other than 0
and 1.

Here is some information from the BASH man.page:

EXIT STATUS
For the shell's purposes, a command which exits with a zero exit status has succeeded. An exit status of zero indicates success. A non-zero exit status indicates failure. When a command terminates on a fatal
      signal N, bash uses the value of 128+N as the exit status.

This would indicate that your program terminated on a fatal signal 2,
since 128+2 = 130.

From "man 7 signal":

SIGINT        2       Term    Interrupt from keyboard

Interrupt from keyboard is what normally happens when you type <ctrl> C.

If this isn't what happened, and you wrote the program yourself, maybe
it doesn't have a proper exit() statement.  Or somebody else wrote it
without a proper exit() statement.

   carl

I am trying out Kubuntu to see if I want to use it. Everything is working well. The only problem (so far) is I cannot ssh into my other computer from kubuntu. THe command hangs and I have to Ctrl-c to get out; thus the error code 130. I can ssh from the other computer into kubuntu; so I assume everything is configured correctly there, and the problem is in the config in kubuntu. THe ssh_config files are exactly the same in both. I was hoping the error code would give a clue as to the problem.

[EMAIL PROTECTED]:/etc/ssh $ ssh [EMAIL PROTECTED] -v
OpenSSH_4.2p1 Debian-7ubuntu3, OpenSSL 0.9.8a 11 Oct 2005
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to main [192.168.1.50] port 22.

In the past with other distros if ssh cannot connect I usually get some error message like connection refused, or cannot locate.

Thanks for you clear explanation. I read that part of the bash manual but the 128 + 2 did not register with me.

Jerry

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-newbie

Reply via email to