Le 2011-12-24 14:16, Russ Allbery a écrit :
Filipus Klutiero<chea...@gmail.com> writes:
Section 11.8.3 "Packages providing a terminal emulator" contains:
To be an x-terminal-emulator, a program must:
Support the command-line option -e command, which creates a new
terminal window[94
<http://www.debian.org/doc/debian-policy/footnotes.html#f94>]
and runs the specified command, interpreting the entirety of the
rest of the command line as a command to pass straight to exec,
in the manner that xterm does.
However, as pointed out by Hendrik Sattler in #563352, xterm does *not*
simply pass its -e option straight to exec, at least nowadays. The
following command exemplifies:
$ xterm -e 'echo TEST&& sleep 3'
This works as intended, so xterm does not just support simple commands,
but also pipelines.
[...]
By the way, as Hendrik wrote, it would be best to specify how
x-terminal-emulator should behave, rather than to say the behavior
should be the same as xterm's. Also, the term "command" is ambiguous.
I think there are a couple of different ways we could go with this. One
is to fully specify xterm's behavior (including the fallback to the shell)
and require that everything else satisfy that, but from the referenced bug
it doesn't look like other upstreams want to do that. The other is to be
clearer that the default is to call exec but to allow the fallback that
xterm does. I think the latter makes more sense.
How about something like:
Support the command-line option "-e<command>", which creates a new
terminal window and runs the specified command.<command> may be
multiple arguments, all of which are part of the command. All
arguments are passed directly to exec, 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.)
I cannot say what the policy should be, this is just about how it should
be written. The only comment I can make on what the policy should be is
that the bug which made me open #563352 is #558454 (which is
outstanding, despite the bug report's status). The problem causing
#558454 is that Konsole only takes a command name as its -e option, not
a simple command, let alone a pipeline. So regarding that bug, any of
the changes you propose will work (current policy already makes it clear
that Konsole is non-compliant). In other words, I'm not asking to change
the policy, but I do not mind if you change it.
Regarding the formulation, your suggestion does fix the issue Hendrik
identified. I would still remind that the term "command" is ambiguous
(you must be referring to simple commands here). Also, I suggest to make
the policy as implementation-independent as possible, ideally avoiding
to force usage of exec.
--
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ef637d2.3050...@gmail.com