|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH XEN v7 27/29] tools/libs/*: Use O_CLOEXEC on Linux and FreeBSD
>>> On 16.12.15 at 13:31, <ian.campbell@xxxxxxxxxx> wrote:
> --- a/tools/libs/call/freebsd.c
> +++ b/tools/libs/call/freebsd.c
> @@ -35,8 +35,14 @@
>
> int osdep_xencall_open(xencall_handle *xcall)
> {
> - int flags, saved_errno;
> - int fd = open(PRIVCMD_DEV, O_RDWR);
> + int saved_errno;
> + int fd = open(PRIVCMD_DEV, O_RDWR|O_CLOEXEC);
No compatibility define needed for FreeBSD?
> --- a/tools/libs/call/linux.c
> +++ b/tools/libs/call/linux.c
> @@ -26,15 +26,23 @@
>
> #include "private.h"
>
> +#ifndef O_CLOEXEC
> +#define O_CLOEXEC 02000000
> +#endif
Is that a good idea? Wouldn't you better define to zero if building on
an old glibc, assuming you'd then also run on an old kernel?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |