Question about 4.2BSD uprintf()

Bruce Robertson bruce at stride.UUCP
Sat Feb 22 03:45:12 AEST 1986


I was wondering about something I saw in "subr_prf.c" in the 4.2 BSD
kernel sources.  The comments for the function uprintf() advertise that
you can call it from an interrupt routine to send a message to the
current user's terminal.  However, the code that finds out the user's
current terminal references u.u_ttyp.  This means that uprintf() will
print its message on the terminal of the *currently running* process.
Which process this is is essentially random, and almost always NOT the
process that caused the interrupt to occur.  I can't think of any
situation where you would want to actually call uprintf() from an
interrupt routine.  Any comments?
-- 

	Bruce Robertson
	UUCP: cbosgd!utah-cs!utah-gr!stride!bruce
	ARPA: stride!bruce at utah-gr.arpa



More information about the Comp.bugs.4bsd.ucb-fixes mailing list