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: Make gdbserver use async I/O on Linux



On Wed, 6 Jun 2001, Daniel Jacobowitz wrote:

> The only problem I can think of that this might cause is if F_SETOWN is less
> portable than FASYNC.

Exactly.  And that is why I'd suggest to make this change conditioned
on F_SETOWN being defined.

Please note that the original code took care to use the F* macros
only if they were defined:

>  #if defined(F_SETFL) && defined (FASYNC)
>    save_fcntl_flags = fcntl (remote_desc, F_GETFL, 0);
>    fcntl (remote_desc, F_SETFL, save_fcntl_flags | FASYNC);
> +  fcntl (remote_desc, F_SETOWN, getpid());
>    disable_async_io ();
>  #endif /* FASYNC */

This uses F_SETFL and FASYNC only if they are defined.  I suggest to
do the same with F_SETOWN.


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