FreeBSD Bugzilla – Attachment 5269 Details for
Bug 12723
Unnecessary use of magic numbers in F_[SG]ETFD code
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.54 KB, created by
Peter Jeremy
on 1999-07-21 00:30:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Peter Jeremy
Created:
1999-07-21 00:30:00 UTC
Size:
1.54 KB
patch
obsolete
>Index: kern_descrip.c >=================================================================== >RCS file: /home/CVSROOT/./src/sys/kern/kern_descrip.c,v >retrieving revision 1.64 >diff -u -r1.64 kern_descrip.c >--- kern_descrip.c 1999/06/07 20:37:27 1.64 >+++ kern_descrip.c 1999/07/20 23:06:23 >@@ -247,11 +247,12 @@ > return (finishdup(fdp, uap->fd, i, p->p_retval)); > > case F_GETFD: >- p->p_retval[0] = *pop & 1; >+ p->p_retval[0] = (*pop & UF_EXCLOSE) ? FD_CLOEXEC : 0; > return (0); > > case F_SETFD: >- *pop = (*pop &~ 1) | (uap->arg & 1); >+ *pop = (*pop &~ UF_EXCLOSE) | >+ (uap->arg & FD_CLOEXEC ? UF_EXCLOSE : 0); > return (0); > > case F_GETFL: >Index: /3.0/cvs/src/lib/libc/sys/fcntl.2 >=================================================================== >RCS file: /home/CVSROOT/./src/lib/libc/sys/fcntl.2,v >retrieving revision 1.14 >diff -u -r1.14 fcntl.2 >--- fcntl.2 1999/07/12 20:48:21 1.14 >+++ fcntl.2 1999/07/20 23:20:54 >@@ -80,8 +80,12 @@ > .El > .It Dv F_GETFD > Get the close-on-exec flag associated with the file descriptor >-.Fa fd . >-If the low-order bit of the returned value is 0, >+.Fa fd >+as >+.Dv FD_CLOEXEC . >+If the returned value anded with >+.Dv FD_CLOEXEC >+is 0, > the file will remain open across > .Fn exec , > otherwise the file will be closed upon execution of >@@ -91,9 +95,13 @@ > .It Dv F_SETFD > Set the close-on-exec flag associated with > .Fa fd >-to the low order bit of >+to >+.Fa arg , >+where > .Fa arg >-(0 or 1 as above). >+is either 0 or >+.Dv FD_CLOEXEC , >+as described above. > .It Dv F_GETFL > Get descriptor status flags, as described below > .Fa ( arg
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 12723
: 5269