buggrep - Bugs: bug #34917, grep refuses to run when input...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #34917: grep refuses to run when input file is also the output, even when the -q option is used

Submitted by:  Nicolas Vigier <boklm>
Submitted on:  Mon 28 Nov 2011 12:29:36 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 29 Feb 2012 05:37:57 PM UTC, comment #2:

This bug was fixed in the master in December 2011 with commit ed071726be5758b1422d7972450a1867655268b4.

Paul Eggert <eggert>
Project Member
Mon 28 Nov 2011 12:47:28 AM UTC, comment #1:

Oops, I misunderstood the issue reported on Mageia bugzilla.

The issue is a little different :
When the -q option is used, there should not be any error output. grep version 2.10 outputs errors about "input file `./file' is also the output" even when the -q options is used.

But not rejecting the command when the -q option is used should also fix this.

Nicolas Vigier <boklm>
Mon 28 Nov 2011 12:29:36 AM UTC, original submission:

Forwarding an issue that was reported on Mageia bugzilla :
https://bugs.mageia.org/show_bug.cgi?id=3501

To avoid infinite disk-filling loop, grep since version 2.10 rejects commands in which the output file is also one of the inputs.

However it also rejects commands which have the -q option. If the -q option is used, there is no output so it cannot create a loop, therefore the command should not be rejected.

Nicolas Vigier <boklm>

 

Attached Files
file #24476:  grep_-q.patch added by boklm (712B - text/x-patch - Proposed patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by eggert (Posted a comment)
  • -unavailable- added by boklm (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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 29 Feb 2012 06:05:35 PM UTCeggertStatusNone=>Fixed
    Wed 29 Feb 2012 05:37:57 PM UTCeggertOpen/ClosedOpen=>Closed
    Mon 28 Nov 2011 01:01:25 AM UTCboklmAttached File-=>Added grep_-q.patch, #24476

    Back to the top


    Powered by Savane 3.1-cleanup1