usr.bin/pascal/pdx/process/resume.c
/*
 * Under the -r option, we offer the opportunity to just get
 * the px traceback and not actually enter the debugger.
 *
 * If the standard input is not a tty but standard error is,
 * change standard input to be /dev/tty.
 */
Under the -r option, we offer the opportunity to just get
the px traceback and not actually enter the debugger.

If the standard input is not a tty but standard error is,
change standard input to be /dev/tty.
Under the - r option we offer the opportunity to just get the px traceback and not actually enter the debugger . If the standard input is not a tty but standard error is change standard input to be / dev / tty .
LOCAL choose()
{
    register int c;
    if (!isterm(stdin)) {
	if (!isterm(stderr) || freopen("/dev/tty", "r", stdin) == NIL) {
	    unsetsigtraces(process);
	    pcont(process);
	    quit(process->exitval);
	}
    }
    fprintf(stderr, "\nProgram error");
    fprintf(stderr, "\nDo you wish to enter the debugger? ");
    c = getchar();
    if (c == 'n') {
	unsetsigtraces(process);
	pcont(process);
	quit(process->exitval);
    }
    while (c != '\n' && c != EOF) {
	c = getchar();
    }
    fprintf(stderr, "\nEntering debugger ...");
    init();
    option('r') = FALSE;
    fprintf(stderr, " type 'help' for help.\n");
}
LOCAL choose ( ) { register int c ; if ( ! isterm ( stdin ) ) { if ( ! isterm ( stderr ) || freopen ( " " , " " , stdin ) == NIL ) { unsetsigtraces ( process ) ; pcont ( process ) ; quit ( process -> exitval ) ; } } fprintf ( stderr , " \n " ) ; fprintf ( stderr , " \n " ) ; c = getchar ( ) ; if ( c == ' ' ) { unsetsigtraces ( process ) ; pcont ( process ) ; quit ( process -> exitval ) ; } while ( c != ' \n ' && c != EOF ) { c = getchar ( ) ; } fprintf ( stderr , " \n " ) ; init ( ) ; option ( ' ' ) = FALSE ; fprintf ( stderr , " \n " ) ; }
Under the -r option, we offer the opportunity to just get
 the px traceback and not actually enter the debugger.
Under the - r option we offer the opportunity to just get the px traceback and not actually enter the debugger .
/* NOTREACHED */