usr.sbin/lpr/lpd/printjob.c
/*
 * Printer is connected to an RS232 port on this host
 */
Printer is connected to an RS232 port on this host
Printer is connected to an RS232 port on this host
static void
opentty()
{
	register int i;
	int resp, port;
	for (i = 1; ; i = i < 32 ? i << 1 : i) {
		pfd = open(LP, RW ? O_RDWR : O_WRONLY);
		if (pfd >= 0) {
			delay(500);
			break;
		}
		if (errno == ENOENT) {
			syslog(LOG_ERR, "%s: %m", LP);
			exit(1);
		}
		if (i == 1)
			pstatus("waiting for %s to become ready (offline ?)",
				printer);
		sleep(i);
	}
	if (isatty(pfd))
		setty();
	pstatus("%s is ready and printing", printer);
}
static void opentty ( ) { register int i ; int resp , port ; for ( i = 1 ; ; i = i < 32 ? i << 1 : i ) { pfd = open ( LP , RW ? O_RDWR : O_WRONLY ) ; if ( pfd >= 0 ) { delay ( 500 ) ; break ; } if ( errno == ENOENT ) { syslog ( LOG_ERR , " " , LP ) ; exit ( 1 ) ; } if ( i == 1 ) pstatus ( " " , printer ) ; sleep ( i ) ; } if ( isatty ( pfd ) ) setty ( ) ; pstatus ( " " , printer ) ; }
Printer is connected to an RS232 port on this host
Printer is connected to an RS232 port on this host