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

Submitter:  None
Submitted:  Thu 06 Dec 2007 01:40:15 AM UTC
   
 
Category:  xargs Severity:  3 - Normal
Item Group:  None Status:  Wont Fix
Privacy:  Public Assigned to:  jay
Originator Name:  Nikos Ntarmos Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  4.2.31
Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
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 Files:
   
   
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
  • -email is unavailable- added by ntarmos (Posted a comment)
  • -email is unavailable- added by jay (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2008-02-09 jay Open/ClosedOpen Closed
    2008-01-07 jay StatusNone Wont Fix
    2008-01-07 jay Attached File- Added 0001-Documentation-of-xargs-sh-c.patch, #14766
    2007-12-06 jay Attached File- Added 0002-Added-examples-on-stdin-handling-and-more-efficient.patch, #14572
        Assigned toNone jay
    2007-12-06 None Attached File- Added xargs-tty.diff, #14567

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code