Bug 1415757

Summary: Incorrect example in pthread_once(3p) man page
Product: [Fedora] Fedora Reporter: Daniel Berrangé <berrange>
Component: man-pagesAssignee: Nikola Forró <nforro>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC: jchaloup, nforro
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: man-pages-4.06-4.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-29 00:21:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.