Hi Todd & Andrew,

Andrew Fresh wrote on Thu, May 02, 2019 at 09:53:29AM -0700:
> On Thu, May 02, 2019 at 10:21:15AM -0600, Todd C. Miller wrote:
>> On Thu, 02 May 2019 10:53:37 -0500, Andrew Daugherity wrote:

>>> I reported this to FreeBSD ports a couple months ago [2], and they
>>> provided a fix [3] which repairs the -oMan output, and makes that the
>>> default.  Their fix applies cleanly to the OpenBSD tree and works, but
>>> I have no idea why mandoc requires resetting $?.  (Also, their ToMan
>>> patch has a previously-included hunk for MANWIDTH=tty, but it doesn't
>>> seem to do anything for me?)

>> There problem is a missing waitpid() call, so $? is not actually
>> set.  Something like the following should be better, though I haven't
>> tested it yet.

> This seems to work fine for me, OK afresh1@

OK schwarze@, too.

> I submitted this upstream as well, so hopefully shouldn't have to keep
> the patch for too long.
> https://github.com/mrallen1/Pod-Perldoc/pull/39

Thanks.

> Still looking at defaulting to -oMan, but probably a good idea.

I agree in principle that -oMan ought to become the default.

Yours,
  Ingo


>> Index: gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm
>> ===================================================================
>> RCS file: 
>> /cvs/src/gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm,v
>> retrieving revision 1.8
>> diff -u -p -u -r1.8 ToMan.pm
>> --- gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm       13 Feb 
>> 2019 21:15:14 -0000      1.8
>> +++ gnu/usr.bin/perl/cpan/Pod-Perldoc/lib/Pod/Perldoc/ToMan.pm       2 May 
>> 2019 16:16:05 -0000
>> @@ -352,6 +352,9 @@ sub _filter_through_nroff {
>>      close $writer;
>>      $self->debug( "Done writing\n" );
>>  
>> +    # wait for it to exit
>> +    waitpid( $pid, 0 );
>> +
>>      # read any leftovers
>>      $done .= do { local $/; <$reader> };
>>      $self->debug( sprintf "Done reading. Output is %d bytes\n",
>> 


> I wish life had an UNDO function.

I didn't know you were *that* cruel.
All professional Chess and Go players are going to starve
because no game will ever get finished.

Reply via email to