From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,bc2cf1dd6e919470,start X-Google-Attributes: gid1164f8,public X-Google-Thread: 10ff41,bc2cf1dd6e919470,start X-Google-Attributes: gid10ff41,public X-Google-Thread: 10b612,bc2cf1dd6e919470,start X-Google-Attributes: gid10b612,public X-Google-Thread: 10f9b1,bc2cf1dd6e919470,start X-Google-Attributes: gid10f9b1,public X-Google-ArrivalTime: 1992-01-04 01:18:10 PST Xref: sparky comp.bugs.4bsd:43 comp.sys.dec:1112 comp.unix.ultrix:1771 comp.unix.wizards:1170 Path: sparky!uunet!mcsun!news.funet.fi!sunic!dkuug!dd!keld From: keld@dd.UUCP (Keld Joergensen) Newsgroups: comp.bugs.4bsd,comp.sys.dec,comp.unix.ultrix,comp.unix.wizards Subject: SIGALRM disturbing Terminal IO Summary: Putc looses chars when signal occurs Keywords: SIGNAL SIGALRM ULTRIX RISC OUTPUT TERMINAL PUTC Message-ID: <36@dd.UUCP> Date: 3 Jan 92 10:31:34 GMT Followup-To: comp.bugs.4bsd Organization: Damgaard Data A/S 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