The following sample program is a that stays alive as long as the DD system exists.
#include <dd_user.h>
{
ddu_attach();
while ( ddu_attached() ) {
/* monitor something */
}
printf(``DD system disappeared
ddu_detach();
}
main()
\n'');