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)
Tue, Dec 24, 11:25 PM
Unknown Object (File)
Fri, Dec 6, 6:53 AM
Unknown Object (File)
Fri, Dec 6, 6:51 AM
Unknown Object (File)
Nov 26 2024, 10:31 AM
Unknown Object (File)
Nov 24 2024, 2:14 PM
Unknown Object (File)
Nov 22 2024, 5:34 PM
Unknown Object (File)
Nov 21 2024, 6:46 AM
Unknown Object (File)
Nov 16 2024, 4:16 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 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

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