The following statement is a part of man 2 fctl.

     [EINTR]            The argument cmd is invalid.

                        The argument cmd is F_SETLKW, and the function
                        was
                        interrupted by a signal.

Will EINVAL be returned in the case of 'The argument cmd is invalid'?

Will EINTR be returned for F_SETLK?
The following code is sys/kern/kern_descrip.c sys_fcntl():

        case F_SETLKW:
                flg |= F_WAIT;
                /* FALLTHROUGH */

        case F_SETLK:

How about it?

Index: fcntl.2
===================================================================
RCS file: /cvs/src/lib/libc/sys/fcntl.2,v
retrieving revision 1.32
diff -u -p -r1.32 fcntl.2
--- fcntl.2     10 Nov 2018 11:54:03 -0000      1.32
+++ fcntl.2     4 Sep 2019 07:15:33 -0000
@@ -465,14 +465,14 @@ and a deadlock condition was detected.
 .It Bq Er EINTR
 The argument
 .Fa cmd
-is invalid.
-.Pp
-The argument
-.Fa cmd
 is
-.Dv F_SETLKW ,
+.Dv F_SETLK or F_SETLKW ,
 and the function was interrupted by a signal.
 .It Bq Er EINVAL
+The argument
+.Fa cmd
+is invalid.
+.Pp
 .Fa cmd
 is
 .Dv F_DUPFD
--
ASOU Masato

Reply via email to