groff
[Top][All Lists]
Advanced

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

Re: [Groff] Groff pipeline plumbing problem


From: Rick Richardson
Subject: Re: [Groff] Groff pipeline plumbing problem
Date: Fri, 28 Dec 2001 16:29:45 -0600
User-agent: Mutt/1.2.5i

On Fri, Dec 28, 2001 at 03:13:32PM -0600, Rick Richardson wrote:
> On Fri, Dec 28, 2001 at 08:30:10PM +0000, Ralph Corderoy wrote:
> > 
> > Hi Rick,
> > 
> > > It looks to me like the "groff" driver in the latest CVS version is
> > > putting together bogus pipelines.  This is with the latest CVS
> > > version:
> > > 
> > > $ /usr/local/test/bin/groff -P-Ixxx.1 -P-o0 -P-i100 -t -man -Thtml xxx.1
> > > post-grohtml:<standard input>:1:fatal error: the first command must
> > >     be `x T'
> > > 
> > > It appears to me that post-grohtml is getting exec'ed *twice* by
> > > "groff", and the second time there is already HTML in its input!!!!!
> > 
> > What does groff's -V option show?  This displays the pipeline instead
> > of executing it.
> > 
> >     % ./test-groff -V -P-Ixxx.1 -P-o0 -P-i100 -t -man -Thtml xxx.1
> >     soelim xxx.1 | tbl | pre-grohtml -Ixxx.1 -o0 -i100 troff -man -Thtml |
> >         post-grohtml -Ixxx.1 -o0 -i100
> 
> $ /usr/local/test/bin/groff -V -P-Ixxx.1 -P-o0 -P-i100 -t -man -Thtml xxx.1 
> soelim xxx.1 | tbl | pre-grohtml -Ixxx.1 -o0 -i100 troff -man -Thtml | 
> post-grohtml -Ixxx.1 -o0 -i100
> 
> This is the same pipeline that is reported by groff 1.17.  However,
> it works fine with 1.17, but not with CVS 1.18.

Here's the fork/exec tree reported by strace for both 1.17 and CVS.
You'll need to stretch your xterm to maximum # of columns to see the
tree properly.

The problem seems to come when groff-CVS process 16700 (forked from
pre-grohtml) does this:

        16700 execve("/usr/local/test/bin/groff",

groff-1.17 seems to exec /usr/bin/troff at that point, not the groff wrapper.

-Rick


groff 1.17...

17810 execve("/usr/bin/groff", ["groff", "-P-Ixxx.1", "-P-o0", "-P-i100", "-t", 
"-man", "-Thtml", "xxx.1"], [/* 37 vars */]) = 0
17810 fork()                            = 17811
17810 fork()                            = 17812
        17812 execve("/usr/bin/tbl", ["tbl"], [/* 38 vars */]) = 0
        17811 execve("/usr/bin/soelim", ["soelim", "xxx.1"], [/* 38 vars */]) = 0
17810 fork()                            = 17813
17810 fork()                            = 17814
        17813 execve("/usr/bin/pre-grohtml", ["pre-grohtml", "-i100", "-o0", 
"-Ixxx.1", "troff", "-man", "-Thtml"], [/* 38 vars */]) = 0
        17813 fork()                            = 17815
                17815 execve("/usr/bin/groff", ["groff", "-man", "-Tps", 
"-rps4html=1"], [/* 38 vars */]) = 0
                17815 fork()                            = 17816
        17814 execve("/usr/bin/post-grohtml", ["post-grohtml", "-Ixxx.1", 
"-o0", "-i100"], [/* 38 vars */]) = 0
                17815 fork()                            = 17817
                        17817 execve("/usr/bin/grops", ["grops"], [/* 38 vars 
*/]) = 0
                        17816 execve("/usr/bin/troff", ["troff", "-man", 
"-rps4html=1", "-Tps"], [/* 38 vars */]) = 0
        17813 fork()                            = 17818
                17818 execve("/bin/sh", ["sh", "-c", "echo showpage | gs -q 
-dSAFER -s"...], [/* 38 vars */]) = 0
                17818 fork()                            = 17819
                17818 fork()                            = 17820
                        17820 execve("/usr/bin/gs", ["gs", "-q", "-dSAFER", 
"-sDEVICE=pnmraw", "-r100", "-sOutputFile=/tmp/groff-page-m6h"..., 
"/tmp/groff-ps-0RC55A", "-"], [/* 37 vars */]) = 0
        17813 fork()                            = 17821
                17821 execve("/usr/bin/troff", ["troff", "-man", "-Thtml"], [/* 
38 vars */]) = 0


groff CVS...

16689 execve("/usr/local/test/bin/groff", ["/usr/local/test/bin/groff", 
"-P-Ixxx.1", "-P-o0", "-P-i100", "-t", "-man", "-Thtml", "xxx.1"], [/* 37 vars 
*/]) = 0
16689 fork()                            = 16690
        16690 execve("/usr/local/test/bin/soelim", ["soelim", "xxx.1"], [/* 38 
vars */]) = 0
16689 fork()                            = 16691
        16691 execve("/usr/local/test/bin/tbl", ["tbl"], [/* 38 vars */]) = 0
16689 fork()                            = 16692
16689 fork()                            = 16693
        16692 execve("/usr/local/test/bin/pre-grohtml", ["pre-grohtml", 
"-Ixxx.1", "-o0", "-i100", "troff", "-man", "-Thtml"], [/* 38 vars */]) = 0
        16692 fork()                            = 16694
        16693 execve("/usr/local/test/bin/post-grohtml", ["post-grohtml", 
"-Ixxx.1", "-o0", "-i100"], [/* 38 vars */]) = 0
                16694 execve("/usr/local/test/bin/groff", ["groff", "-man", 
"-Tps", "-rps4html=1"], [/* 38 vars */]) = 0
                16694 fork()                            = 16695
                        16695 execve("/usr/local/test/bin/troff", ["troff", 
"-man", "-rps4html=1", "-Tps"], [/* 38 vars */]) = 0
                16694 fork()                            = 16696
                        16696 execve("/usr/local/test/bin/grops", ["grops"], 
[/* 38 vars */]) = 0
        16692 fork()                            = 16697
                16697 execve("/bin/sh", ["sh", "-c", "echo showpage | gs -q 
-dSAFER -s"...], [/* 38 vars */]) = 0
                16697 fork()                            = 16698
                16697 fork()                            = 16699
                        16699 execve("/usr/bin/gs", ["gs", "-q", "-dSAFER", 
"-sDEVICE=pnmraw", "-r100", "-sOutputFile=/tmp/groff-page-2Ua"..., 
"/tmp/groff-ps-Egtz6Y", "-"], [/* 37 vars */]) = 0
        16692 fork()                            = 16700
                16700 execve("/usr/local/test/bin/groff", ["groff", "-man", 
"-Thtml"], [/* 38 vars */]) = 0
                16700 fork()                            = 16701
                16700 fork()                            = 16702
                        16701 execve("/usr/local/test/bin/soelim", ["soelim"], 
[/* 38 vars */]) = 0
                16700 fork()                            = 16703
                        16702 execve("/usr/local/test/bin/pre-grohtml", 
["pre-grohtml", "troff", "-man", "-Thtml"], [/* 38 vars */]) = 0
                        16702 fork()                            = 16704
                                16704 execve("/usr/local/test/bin/groff", 
["groff", "-man", "-Tps", "-rps4html=1"], [/* 38 vars */]) = 0
                        16703 execve("/usr/local/test/bin/post-grohtml", 
["post-grohtml"], [/* 38 vars */]) = 0
                                16704 fork()                            = 16705
                                16704 fork()                            = 16706
                                        16705 
execve("/usr/local/test/bin/troff", ["troff", "-man", "-rps4html=1", "-Tps"], 
[/* 38 vars */]) = 0
                                        16706 
execve("/usr/local/test/bin/grops", ["grops"], [/* 38 vars */]) = 0
                        16702 fork()                            = 16707
                                16707 execve("/bin/sh", ["sh", "-c", "echo 
showpage | gs -q -dSAFER -s"...], [/* 38 vars */]) = 0
                                16707 fork()                            = 16708
                                16707 fork()                            = 16709
                                        16709 execve("/usr/bin/gs", ["gs", 
"-q", "-dSAFER", "-sDEVICE=pnmraw", "-r80", 
"-sOutputFile=/tmp/groff-page-zgL"..., "/tmp/groff-ps-ZBcQd2", "-"], [/* 37 
vars */]) = 0
                        16702 fork()                            = 16710
                                16710 execve("/usr/local/test/bin/groff", 
["groff", "-Z", "-man", "-Thtml"], [/* 38 vars */]) = 0
                                16710 fork()                            = 16711
                                        16711 
execve("/usr/local/test/bin/soelim", ["soelim"], [/* 38 vars */]) = 0
                                16710 fork()                            = 16712
                                        16712 
execve("/usr/local/test/bin/troff", ["troff", "-man", "-Thtml"], [/* 38 vars 
*/]) = 0

reply via email to

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