Bug 1415757 - Incorrect example in pthread_once(3p) man page
Summary: Incorrect example in pthread_once(3p) man page
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: man-pages
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nikola Forró
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-23 16:17 UTC by Daniel Berrangé
Modified: 2017-01-29 00:21 UTC (History)
2 users (show)

Fixed In Version: man-pages-4.06-4.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-29 00:21:04 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2017-01-23 16:17:48 UTC
Description of problem:

In the  "RATIONALE" section there is this text:

[quote]
       multi-threaded and realtime systems. The preceding example then becomes:

           #include <pthread.h>
           static pthread_once_t random_is_initialized = PTHREAD_ONCE_INIT;
           extern int initialize_random();

           int random_function()
           {
               (void) pthread_once(&random_is_initialized, initialize_random);
               ... /* Operations performed after initialization. */
           }
[/quote]

This will not compile because pthread_once requires a function whose signature is 

   void (*init_routine)(void));

but the "initalize_random()" function passed in the example is returning 'int' not 'void'.


Version-Release number of selected component (if applicable):
man-pages-4.06-2.fc25.noarch

Comment 2 Fedora Update System 2017-01-24 16:06:07 UTC
man-pages-4.06-4.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-e224d33fa5

Comment 3 Fedora Update System 2017-01-28 19:20:36 UTC
man-pages-4.06-4.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-e224d33fa5

Comment 4 Fedora Update System 2017-01-29 00:21:04 UTC
man-pages-4.06-4.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.