Q:  When Workspace exits, loginwindow sends a message like the following to syslog:

loginwindow: Workspace exited ts 0 cd 0 rc 0 sv 0 ss 0

What do the codes and numbers mean?

A:  These numbers are from the status argument to a wait() system call.

ts termsig The signal which Workspace received causing it to exit.
cd coredump Whether or not Workspace produced a core dump (0: no, non-zero: yes).
rc retcode The exit code from Workspace (low-order eight bits).
sv stopval If this is WSTOPPED (see <sys/wait.h>), Workspace had stopped.  (WSTOPPED is 0177 in Release 2.)
ss stopsig If stopval is WSTOPPED, this is the signal which stopped Workspace.

The most important of these for debugging is termsig: if it's non-zero, it tells you what signal caused Workspace to exit.  These signals are listed in the "signal" UNIX Manual Page, and in <sys/signal.h>.

Let's take an example.  Assume you see the following message:

loginwindow: Workspace exited ts 4 cd 0 rc 0 sv 4 ss 0

The ts 4 indicates that Workspace received a signal 4.  Looking in /usr/include/sys/signal.h, you'll find the following:

#define SIGILL 4 /* illegal instruction (not      reset when caught) */

In this case, Workspace terminated because of an illegal instruction.  You might want to verify that the Workspace executable is intact and has not been corrupted.

Valid for 2.0, 3.0, 3.1