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
F166141197: D31425.id93333.diff
Tue, Aug 11, 11:21 PM
F166119541: D31425.id93333.diff
Tue, Aug 11, 9:23 PM
F166094732: D31425.id93279.diff
Tue, Aug 11, 4:38 PM
Unknown Object (File)
Mon, Aug 10, 12:41 PM
Unknown Object (File)
Mon, Aug 10, 12:31 PM
Unknown Object (File)
Mon, Aug 10, 12:19 PM
Unknown Object (File)
Mon, Aug 10, 12:13 PM
Unknown Object (File)
Mon, Aug 10, 6:24 AM
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 Not Applicable
Unit
Tests Not Applicable

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 โ†—(On Diff #93333)

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

84 โ†—(On Diff #93333)

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