This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: propagate gdb host keyboard interrupts through gdbserver


jtc@redback.com (J.T. Conklin) writes:

> ...  I noticed that code uses a NULL ptr for the
> timeout argument instead of constructing a zeroed timeval.  I'd go 
> for the NULL ptr approach instead of the timeval.  It avoids problems
> with those systems that don't have sys/time.h.

NULL means never timeout, i.e. block awaiting I/O.  zeroed timeval
means timeout immediately if there's no I/O.  An alternative to select
is to set NDELAY on the socket with fcntl.  Yes, i should add a
comment explaining why all this rot is necessary: because I observed
NetBSD delivering redundant SIGIOs.

Greg

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]