For compatibility with Linux.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Seems ok. It would be nice to have a simple regression test in tests/sys/file/closefrom_test.c to ensure this code gets exercised.
| lib/libc/sys/closefrom.2 | ||
|---|---|---|
| 63 | ||
| sys/kern/kern_descrip.c | ||
| 1410 | This error path leaks the lock. | |
| 1493–1494 | This comment can be deleted. | |
| sys/sys/unistd.h | ||
| 206 | Hmm but then you have to update the pattern used in libsysdecode. Alternately just write 0x4 since that's a more common style for flag definitions. | |
| sys/sys/unistd.h | ||
|---|---|---|
| 206 | The above is copy-pasted from rfork. I had manually typed this off but it failed to patter-match, I don't think touching this is worth any effort. | |
Comment Actions
How do you suggest to sensibly test this though? To my surprise I found procstat does not report CLOEXEC, so as is I would have to actually exec.