hp-ux 7.0/800 select() strangeness?

Michael Haberler MAH at awiwuw11.wu-wien.ac.at
Fri Aug 31 01:16:05 AEST 1990


I have encountered a strange behaviour of several programs which use
select(2) on hp-ux 7.0 on the Series 800. All of these programs are
'ported' BSD code, so I have the suspicion there's something in common:

It seems that programs which have select(2) in their inner loop sometimes
start using enormous amounts of system cpu time, just as if the select()
call would return immediately as if it were polling. Among those programs
are Xemacs 18.55, Greg Minshall's tn3270, and named4.8.3.

Xemacs tends to do this especially if the X server terminates before emacs.
I did'nt find a explanation for named behaviour. With tn3270, it looks like
a modem disconnect and thus eof on the tty would cause tn3270 looping.

tn3270 seems to spend it's time in select() itself, while named returns to
user mode and immediately calls select again. One can see this when attaching
the process in question to the debugger (xdp -P <pid> <program>).

Since several programs show this behaviour, I suspect it  has to do with the
way select() is implemented in hpux 7.0.


Has anybody else encountered this behaviour? Is this a bug? If so, is there
a workaround?

- michael



More information about the Comp.unix.wizards mailing list