Problem:
When Animator is invoked, the screen clears, some escape sequences are written including a 'bell' (this can be captured by redirecting stdout and stderr) then the process immediately exits back to the command prompt instead of animating as it should. This happens for all programs including the most simple "hello world" program (use $COBDIR/demo/debug/tictac.cbl to demonstrate). It occurs no matter how animator is invoked, including:
regular "anim"
From within tbox
cross-session with "animsrv"
cross-session with dynamic attachment
CBL_DEBUGBREAK
COBSW= A
Animator is the only feature that's broken: tbox and dfed work fine, and any program can be compiled successfully and will execute successfully, as long as animator is not used.
The COBDIR, LD_LIBRARY_PATH, and PATH environment variables are set correctly. The LMF and ASLMF licensing systems are working correctly.
Setting the environment variable DISPLAY would possibly cause symptoms like this, but DISPLAY is not set.
If the terminfo entry $COBDIR/terminfo/m/mfdebug were unaccessible, it would cause symptoms like this, but in fact the terminfo entry is available and accessible.
In a similar historical case, pseudo-terminal devices were disabled, which caused these same symptoms, but in this case pseudo-terminals are enabled. So there is some other factor causing the problem in this case. Extra information: here is a C program capable of testing whether pseudo-terminals are enabled:
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
main()
{
int pty_fd;
if ((pty_fd = open("/dev/ptmx", O_RDWR|O_NOCTTY)) < 0)
printf("\\nError opening /dev/ptmx, errno = %d\\n\\n",errno);
else
printf("\\nSuccessful open of /dev/ptmx\\n\\n");
}
Resolution:
The cause of the problem turned out to be that the /proc partition was not mounted. Animator wasn't the only broken debugger; the UNIX system debuggers "trace" and "truss" were also broken. The lesson learned is that debuggers in general, including Animator, will not work if the /proc partition is not mounted.