Thanks for telling me about poll. On this system, I have epoll and it looks like it should do the job as soon as I study it enough to make it work. I think the routine I was trying to use predates this so it is time to fall back and do some serious learning.