Page MenuHomeFreeBSD

fork.2: Add a simple use pattern
ClosedPublic

Authored by 0mp on Dec 15 2020, 7:18 PM.
Tags
None
Referenced Files
F110311465: D27626.diff
Sun, Feb 16, 3:31 PM
Unknown Object (File)
Thu, Feb 6, 1:09 PM
Unknown Object (File)
Thu, Feb 6, 12:40 PM
Unknown Object (File)
Thu, Feb 6, 12:35 PM
Unknown Object (File)
Thu, Feb 6, 10:16 AM
Unknown Object (File)
Sun, Feb 2, 10:39 PM
Unknown Object (File)
Jan 15 2025, 5:33 PM
Unknown Object (File)
Dec 28 2024, 4:40 AM
Subscribers

Details

Summary
fork.2: Add a simple use pattern

It seems to be a nice idea to show how fork() is usually used in practice. This
may act as a guide to developers who want to quickly recall how to use the
fork() function.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35479
Build 32389: arc lint + arc unit

Event Timeline

0mp requested review of this revision.Dec 15 2020, 7:18 PM
lib/libc/sys/fork.2
114
118

i'd use err(3) instead, but that's just my preference

  • Use pid_t
  • Use err() instead of perror
bcr added a subscriber: bcr.

OK from manpages. Thanks for the example, I think it is great to have.

0mp marked 2 inline comments as done.Apr 17 2021, 9:12 PM
This revision was not accepted when it landed; it landed in state Needs Review.Apr 17 2021, 9:13 PM
This revision was automatically updated to reflect the committed changes.