[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

signals interrupting wgetch

From: John Gruenenfelder
Subject: signals interrupting wgetch
Date: Wed, 20 Jul 2005 18:21:34 -0700
User-agent: Mutt/1.5.9i

I seem to be having a problem with signals interrupting my call to wgetnstr
(which uses wgetch).  According to the man page for wgetch:

 "Under the ncurses implementation, handled signals never interrupt getch."

Until today, this was the case.  Today I updated the kernel from 2.6.11 to
2.6.12.  This is on a Debian Sid (current) machine.

The signal in question is SIGALRM which is generated every two seconds.
When the signal occurs, wgetnstr returns -1.  Checking errno (via perror), the
error is:
  "Interrupted system call"

By changing part of my code, I could do with out the timer which generates
SIGALRM and just poll the clock, but I'd like to know why the behavior changed
or if perhaps I am doing something wrong.

For reference, the extent of my ncurses configuration is:

  keypad(stdscr, TRUE);
  main_win = newwin(LINES - 1, COLS, 0, 0);
  scrollok(main_win, TRUE);

And then I proceed to start reading/writing main_win.

Thanks for any help!

--John Gruenenfelder    Research Assistant, Steward Observatory, U of Arizona
Try Weasel Reader for PalmOS  --  http://gutenpalm.sf.net
"This is the most fun I've had without being drenched in the blood
of my enemies!"
        --Sam of Sam & Max

reply via email to

[Prev in Thread] Current Thread [Next in Thread]