Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1507111

Re: [PATCH] fs: fcntl, avoid undefined behaviour

From Jiri Slaby <jslaby@suse.cz>
Newsgroups linux.kernel
Subject Re: [PATCH] fs: fcntl, avoid undefined behaviour
Date 2016-10-24 13:40 +0200
Message-ID <svLLI-6ZR-9@gated-at.bofh.it> (permalink)
References <ss6Yp-7QI-7@gated-at.bofh.it> <ss99T-JJ-7@gated-at.bofh.it> <ssb22-1TI-25@gated-at.bofh.it> <svJAe-5Aj-17@gated-at.bofh.it> <svLC2-6Wt-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 10/24/2016, 01:29 PM, Jeff Layton wrote:
> It looks like it lists this as a "may fail" case:
> 
>     http://pubs.opengroup.org/onlinepubs/9699919799/functions/fcntl.html
> 
>     [EINVAL]
>         The cmd argument is F_SETOWN and the value of the argument
>         is not valid as a process or process group identifier.

Huh, my man 3p fcntl only lists [EDEADLK] at that point. (I have 2013
edition opposing to 2016 from the link above)

> IMO, returning an error here is the right thing to do. Either the
> application isn't checking for errors, in which case returning one won't
> matter, or it is, and they probably want to be informed that their
> F_SETOWN didn't do what they expected.

Ok, will do.

-- 
js
suse labs

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] fs: fcntl, avoid undefined behaviour Jiri Slaby <jslaby@suse.cz> - 2016-10-14 11:30 +0200
  Re: [PATCH] fs: fcntl, avoid undefined behaviour Jeff Layton <jlayton@redhat.com> - 2016-10-14 13:50 +0200
    Re: [PATCH] fs: fcntl, avoid undefined behaviour "J. Bruce Fields" <bfields@fieldses.org> - 2016-10-14 15:50 +0200
      Re: [PATCH] fs: fcntl, avoid undefined behaviour Jiri Slaby <jslaby@suse.cz> - 2016-10-24 11:20 +0200
        Re: [PATCH] fs: fcntl, avoid undefined behaviour Jeff Layton <jlayton@redhat.com> - 2016-10-24 13:30 +0200
          Re: [PATCH] fs: fcntl, avoid undefined behaviour Jiri Slaby <jslaby@suse.cz> - 2016-10-24 13:40 +0200

csiph-web