Page MenuHomeFreeBSD

Some clarifications for fork(2) and _Exit(3) man pages
ClosedPublic

Authored by kib on Aug 5 2021, 4:08 PM.
Tags
None
Referenced Files
F166476924: D31425.id93333.diff
Thu, Aug 13, 7:11 PM
F166471322: D31425.id93346.diff
Thu, Aug 13, 6:35 PM
F166316272: D31425.id93415.diff
Wed, Aug 12, 8:55 PM
Unknown Object (File)
Wed, Aug 12, 4:35 PM
Unknown Object (File)
Tue, Aug 11, 11:21 PM
Unknown Object (File)
Tue, Aug 11, 9:23 PM
Unknown Object (File)
Tue, Aug 11, 4:38 PM
Unknown Object (File)
Mon, Aug 10, 12:41 PM
Subscribers
None

Details

Summary

fork(2): comment about doubtful use of stdio and exit(3) in example
Add fflush(stdout) as the common idiom. Explain the need to use exit() but advise against it.

_Exit(3): document implementation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Aug 5 2021, 4:08 PM
kib created this revision.
lib/libc/sys/fork.2
178

Maybe s/at least/and other possible issues/ or similar, if I understand correctly.

kib marked an inline comment as done.

reformulate 'at least'.

lib/libc/stdlib/exit.3
71–72

I do not understand what this is referring to: tmpfile() unlinks the newly created file before returning.

84

Assuming this refers to tmpfile(3), I do not see why.

kib marked 2 inline comments as done.

Remove references to tmpfile, add notion about destructors registered with __cxa_atexit(3)

This revision is now accepted and ready to land.Aug 8 2021, 4:31 PM