This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: PATCH: Make gdbserver use async I/O on Linux
- To: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Subject: Re: PATCH: Make gdbserver use async I/O on Linux
- From: Eli Zaretskii <eliz at is dot elta dot co dot il>
- Date: Thu, 7 Jun 2001 09:36:23 +0300 (IDT)
- cc: gdb-patches at sources dot redhat dot com
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.