bugfindutils - Bugs: bug #21734, [Patch] Adding -o flag to reopen...

 
 

bug #21734: [Patch] Adding -o flag to reopen stdin as /dev/tty similar to BSD xargs

Submitted by:  None
Submitted on:  Thu 06 Dec 2007 01:40:15 AM UTC  
 
Category: xargsSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: James Youngman <jay>
Originator Name: Nikos NtarmosOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 4.2.31
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Mon 07 Jan 2008 11:26:18 PM UTC, comment #3:

I've opted to better document the portable techniques for achieving the same thing rather than adding this option. Certainly I'm willing to reconsider, but at the moment I don't see a convincing rationale for adding the option.

However, thanks for contributing.

(file #14766)

James Youngman <jay>
Project AdministratorIn charge of this item.
Thu 06 Dec 2007 05:20:10 PM UTC, comment #2:

Hmmm... I was not aware of that syntax, so yes, -o is not necessary. IMHO it would be nice to have this flag, though, even just for BSD compatibility.

Nikos Ntarmos <ntarmos>
Thu 06 Dec 2007 10:39:52 AM UTC, comment #1:

Why is it necessary to add another option to do this though? Surely the portable alternative

echo foo bar | xargs sh -c 'emacs "$@" < /dev/tty' emacs

works fine, works on every platform, and is more flexible? I attach a patch to the xargs manpage.

(file #14572)

James Youngman <jay>
Project AdministratorIn charge of this item.
Thu 06 Dec 2007 01:40:15 AM UTC, original submission:

The attached patch adds a -o flag, which reopens stdin as /dev/tty in the child process prior to execvp(3). BSD xargs has the exact same flag for this reason. This is very useful if the command to launch is an interactive one. This patch is against 4.2.31 (the latest version available on my Debian Sid box) but also applies to CVS HEAD.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #14567:  xargs-tty.diff added by None (3KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by ntarmos (Posted a comment)
  • -unavailable- added by jay (Updated the item)
  • -unavailable- added by None (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 09 Feb 2008 10:18:41 AM UTCjayOpen/ClosedOpen=>Closed
    Mon 07 Jan 2008 11:26:18 PM UTCjayStatusNone=>Wont Fix
    Mon 07 Jan 2008 11:26:17 PM UTCjayAttached File-=>Added 0001-Documentation-of-xargs-sh-c.patch, #14766
    Thu 06 Dec 2007 10:39:52 AM UTCjayAttached File-=>Added 0002-Added-examples-on-stdin-handling-and-more-efficient.patch, #14572
      Assigned toNone=>jay
    Thu 06 Dec 2007 01:40:15 AM UTCNoneAttached File-=>Added xargs-tty.diff, #14567

    Back to the top


    Powered by Savane 3.1-cleanup1