[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#648271: [debian-policy] 11.8.3 "Packages providing a terminal emulator" says xterm passes -e option straight to exec



Filipus Klutiero wrote:
> Le 2011-12-24 19:16, Russ Allbery a écrit :

>>     x-terminal-emulator -e vi 'some file'
>>
>> and know that it works.  If you don't use exec, it won't.
>
> I don't see why exec would be necessary. As long as the emulator supports
> being given any simple command as its -e option, such commands should work.

Is "simple command" a term from POSIX?  It makes me think of simple
commands passed to the shell, which is the opposite of the intended
meaning.  (e.g., “x-terminal-emulator -e vi 'some file'” is meant to
open 'some file' for editing, not two files named "some" and "file"
like “ssh localhost vi 'some file'” would do).

For what it's worth, Russ's text already seems clear to me.  If
relaxing the requirement by allowing use of some mechanism other than
execve to run these commands is desirable, something like the
following might do.

    Support the command-line option "-e <command>", which creates a new
    terminal window and runs the specified command.  <command> may be
    multiple arguments, which form the argument list to the executed
    program.  In other words, the behavior is as though the arguments
    were passed directly to execvp, bypassing the shell.  (xterm's
    behavior of falling back on using the shell if -e had a single
    argument and exec failed is permissible but not required.)



Reply to: