man-db-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

man-db docs/ChangeLog lib/pipeline.c lib/pipeli...


From: Colin Watson
Subject: man-db docs/ChangeLog lib/pipeline.c lib/pipeli...
Date: Sat, 09 Aug 2003 13:28:18 -0400

CVSROOT:        /cvsroot/man-db
Module name:    man-db
Branch:         
Changes by:     Colin Watson <address@hidden>   03/08/09 13:28:18

Modified files:
        docs           : ChangeLog 
        lib            : pipeline.c pipeline.h 

Log message:
        Replace the old "wait() for one child at a time" approach with a
        SIGCHLD-handling edifice that collects children's exit statuses as
        they die.
        
        * lib/pipeline.c (pipeline_new): Initialize statuses.
        (pipeline_join): Set statuses to NULL in joined pipeline.
        (pipeline_join, pipeline_get_infile, pipeline_get_outfile,
        pipeline_start, pipeline_wait): Assert that statuses field is NULL
        or non-NULL as appropriate.
        (pipeline_free): Free statuses if necessary.
        
        (pipeline_start): Add p to a new active_pipelines array, to be
        used while reaping children. Initialize statuses elements to -1.
        Block SIGCHLD while forking children.
        (reap_children): New function. Delivers collected exit statuses
        into statuses fields of entries in active_pipelines.
        (pipeline_wait): Rather than wait()ing manually here, check
        whether any statuses have been picked up by the SIGCHLD handler,
        and if not call reap_children(). Remove now-obsolete TODO comment.
        (pipeline_sigchld): New function, the SIGCHLD handler.
        (pipeline_install_sigchld): New function, to be called once per
        program.
        
        (pipeline_start, pipeline_wait): Add minimal debugging
        information.
        
        * lib/pipeline.h: Prototype new functions.
        (struct pipeline): New statuses member.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/docs/ChangeLog.diff?tr1=1.369&tr2=1.370&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/lib/pipeline.c.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/man-db/man-db/lib/pipeline.h.diff?tr1=1.9&tr2=1.10&r1=text&r2=text





reply via email to

[Prev in Thread] Current Thread [Next in Thread]