bugGNU Parallel - build and execute command lines from standard input in parallel - Bugs: bug #51920, BUG: Set $/ in lots of places...

 
 

bug #51920: BUG: Set $/ in lots of places before calling `chomp`

Submitted by:  Jonathan Kamens <jikamens>
Submitted on:  Sat 02 Sep 2017 06:21:09 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Ole Tange <tange>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 07 Sep 2017 08:35:13 PM UTC, comment #1:

Fixed in [68114b93].

Ole Tange <tange>
Project AdministratorIn charge of this item.
Sat 02 Sep 2017 06:21:09 PM UTC, original submission:

Attaching a patch for:

Several locations in the code use `chomp` with the expectation that
`$/` is set to "\n", which is not true of the user specifies --null or
--delimiter.

This commit adds `local($/) = "\n";` in a number of cases where it is
needed.

The particular instance of this that I encountered which prompted me
to make this change is that a linelen cache file was getting saved
with a newline at the end of its name, since the newline wasn't
properly being removed from the output of `hostname`.

I didn't add an assignment of `$/` in `set_input_source_header`
because I think it's actually not correct to have one there, i.e., I
think that particular function is intended to use whatever delimeter
the user specifies on the command line, but I'm not 100% certain about
that.

Jonathan Kamens <jikamens>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tange (Updated the item)
  • -unavailable- added by jikamens (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 07 Sep 2017 08:35:13 PM UTCtangeStatusNone=>Fixed
      Assigned toNone=>tange
      Open/ClosedOpen=>Closed
    Thu 07 Sep 2017 07:34:07 PM UTCtangeSummaryBUG: Set $/ in lots of places bfore calling `chomp`=>BUG: Set $/ in lots of places before calling `chomp`
    Sat 02 Sep 2017 06:21:09 PM UTCjikamensAttached File-=>Added 0001-BUG-Set-in-lots-of-places-bfore-calling-chomp.patch, #41719

    Back to the top


    Powered by Savane 3.1-cleanup1