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
Unknown Object (File)
Wed, Apr 10, 8:50 PM
Unknown Object (File)
Feb 17 2024, 1:00 AM
Unknown Object (File)
Feb 10 2024, 1:48 PM
Unknown Object (File)
Dec 26 2023, 5:36 AM
Unknown Object (File)
Dec 21 2023, 8:08 AM
Unknown Object (File)
Dec 12 2023, 4:32 PM
Unknown Object (File)
Nov 18 2023, 3:18 PM
Unknown Object (File)
Nov 18 2023, 3:16 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 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