Path: utzoo!attcan!uunet!wuarchive!kuhub.cc.ukans.edu!jian From: jian@kuhub.cc.ukans.edu Newsgroups: comp.unix.questions Subject: Question on printf() Message-ID: <24674.266e3b81@kuhub.cc.ukans.edu> Date: 7 Jun 90 16:33:21 GMT Organization: University of Kansas Academic Computing Services Lines: 34 Hi folks, I have one simple question about printf() on Utrix. Following is the program that I question about: #define #define main() { .... alarm(60); .... signal(SIGALRM, display); .... } /* main() */ display() { printf("\n\n\nEnter Command -> "); alarm(60); } I don't know why the printf() only prints three linefeeds and the "Enter Command -> " only shows up on every next call to display. It seems to me that if I don't do any I/O and linefeed after printf(), the printf() does not print the string argument on the standard output. Why? How can I avoid this problem? I very much appreciate any helps. Jian Li jian@kuhub.cc.ukans.edu