IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Messages with exit-signal



I'm just updating lsh and lshd to use the current signal-related
requests. Two questions:

1. What should I do with unknown signal numbers? I.e. if the OS
   delivers a signal that my implementation doesn't particularly know
   about.

Some options are:

  Don't send any message at all.
  
  Use the empty string for the signal name.
  
  Use a local signal name like "unknown-signal%lysator.liu.se@localhost".
  
  Use a local signal name like "signal-24%lysator.liu.se@localhost".
  
  Do the config.guess-hack, using a name like
  "XCPU@pentium3-pc-linux-gnu.config.guess". 

I want something simple, so I don't want to go for anything more
complex than the first three alternatives unless there is a real
chance that it will be both useful and interoperable. I think I'd
prefer the second alternative, using an empty string to represent
unknown signals. Advice?

2. What should the accompanying message look like?

Some of the alternatives are

  "Segmentation fault" (i.e. whatever strerror returns)
  "Segmentation fault (core dumped)"
  "Process died: Segmentation fault"

I think I'd prefer the first. If the client chooses to display the
message, it has to add some information anyway in order to clearly
indicate that the message originated at the remote end, so it seems
natural to let the client be responsible for making the message look
pretty and only send the information that the client can't figure out
by itself, i.e. only send the string returned by strerror.

/Niels



Home | Main Index | Thread Index | Old Index