* SIGALRM disturbing Terminal IO
@ 1992-01-03 10:31 Keld Joergensen
0 siblings, 0 replies; only message in thread
From: Keld Joergensen @ 1992-01-03 10:31 UTC (permalink / 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1992-01-03 10:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1992-01-03 10:31 SIGALRM disturbing Terminal IO Keld Joergensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox