[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] .rd request
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] .rd request |
Date: |
Fri, 11 Jun 2010 09:45:22 +0100 |
Hi Pierre-Jean,
> With your help, Ralf, and the last command line you've given, I've
> discovered that my problem came from .lf request added by preconv:
> * My bashrc was containing GROFF_ENCODING="UTF-8"
> * I thought that commenting this line and sourcing
> bashrc would remove it, but not...
No, environment variables remain set in the current process until
removed, e.g.
$ FOO=bar; export FOO
$ env | grep FOO
FOO=bar
$ unset FOO
$ env | grep FOO
$
> Fortunately things are working better now,
Good! But this appears to be a bug in groff with the introduction of
preconv. Consider
$ printf 'foo\n\n' |
> preconv |
> strace -fe trace=read nroff <(printf 'a\n.rd\nb\n') 2> >(grep 'read(0,') |
> grep .
a b
[pid 4344] read(0, <unfinished ...>
[pid 4343] read(0, ".lf 1 /dev/fd/63\na\n.rd\nb\n", 4096) = 25
[pid 4343] read(0, "", 4096) = 0
[pid 4343] read(0, "", 4096) = 0
$
I think the original file descriptor 0 is closed, the pipe from preconv
is dup(2)'d onto it, the preconv'd output of groff's input is read, EOF
is reached, and then the later processing of .rd correctly attempts to
read from FD 0 only to again see EOF.
> Is it possible to pass the preconv "-r" option to groff?
Not that I'm aware. Anyone?
Cheers,
Ralph.
- [Groff] .rd request, Pierre-Jean, 2010/06/09
- [Groff] .rd request, pierrejean . f, 2010/06/09
- Re: [Groff] .rd request, Ralph Corderoy, 2010/06/09
- Re: [Groff] .rd request, Ralph Corderoy, 2010/06/09
- Re: [Groff] .rd request, Pierre-Jean, 2010/06/09
- Re: [Groff] .rd request, Ralph Corderoy, 2010/06/09
- Re: [Groff] .rd request, Pierre-Jean, 2010/06/10
- Re: [Groff] .rd request, Ralph Corderoy, 2010/06/10
- Re: [Groff] .rd request, Pierre-Jean, 2010/06/10
- Re: [Groff] .rd request,
Ralph Corderoy <=
- Re: [Groff] .rd request, Ralph Corderoy, 2010/06/11
- Re: [Groff] .rd request, Werner LEMBERG, 2010/06/14