Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: keld@dd.UUCP (Keld Joergensen)
Subject: SIGALRM disturbing Terminal IO
Date: 3 Jan 92 10:31:34 GMT	[thread overview]
Message-ID: <36@dd.UUCP> (raw)

I have a program that does not produce the expected outout 
on a Digital vt420 terminal that is the console on a DECSystem 5100
running Ultrix 4.2

The program writes to stdout using putc. Each call putc() is repeated
until the character written is returned. The typeface is changed for
each position on the screen, so a huge amount of data is dumped to the screen.

For each 24 lines putc'ed to stdout the program calls setitimer in 
order to send a SIGALRM e.g. 10 msecs later. This signal is caught
by an installed signal-handler. 

The problem is that some output sent to stdout is missing when
a SIGALRM has occured. It looks to me as if the output buffer
used by putc is discarded when a SIGALRM occurs. Is this a well known 
behavior of putc()? 

I can avoid the problem by writing to stdout using write(), but I would 
like to use putc()'s buffering mechanism. 

Please answer by mail to keld@dd.dk

Regards

--
 Keld Joergensen        	| Phone:  	+45 4582-3200
 Damgaard Data A/S		| Fax:    	+45 4582-3636/+45 4582-3737
 Bregneroedvej 133		| E-mail: 	keld@dd.dk
 DK-3460 Birkeroed, Denmark 	| UUCP:	        ..!uunet!dd.dk!keld


                 reply	other threads:[~1992-01-03 10:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox