Op 08-08-17 om 00:49 schreef Thorsten Glaser:
> I completely disagree, especially when combined with other wording.
Well, Geoff Clare did say the existing wording is broken in any case.
If the goal is compatibility with pre-existing practice (in this case,
ksh88) and the majority of other shells
Robert Elz dixit:
>there is no right answer - and that the only rational result is that portable
>scripts cannot expect to be able to exec a function (or any builtin that is
Yes, but the others in this thread want to allow portable scripts
to rely on the exec builtin always resulting in a PATH
Martijn Dekker dixit:
>> And this is utter nonsense, the builtin does replace the shell process,
>
>No. On mksh, 'exec builtin' is exactly equivalent to 'builtin; exit'.
>The builtin is run in the existing shell process. No
>replacing/overlaying of the shell process takes place. It's easy to
Martijn Dekker wrote:
> Op 02-08-17 om 22:17 schreef Thorsten Glaser:
> > Robert Elz dixit:
> >
> >> The only way that the standard will ever say that "exec fn" is possible
> >> (exec builtin is supposed to be possible now, as (almost) all builtins
> >> are supposed to have
Op 26-07-17 om 00:41 schreef Thorsten Glaser:
> Martijn Dekker dixit:
>
>> This behaviour also appears to be contrary to the documentation in
>> mksh(1) ("The command is executed without forking, replacing the shell
>> process"). The test script below demonstrates that neither "exec"
>
> And
Thorsten Glaser wrote:
> Whether ?echo? is a builtin or not is an implementation detail.
> Heck, things like ?true?, ?false?, ? are (and others can be)
> implemented in some operating systems by symlinking them to the
> shell executable (either ksh93 *or* mksh? not even
Robert Elz dixit:
> | This specifically means that builtins MAY be made available
> | to exec, and that thatb s an expected modus operandi.
>
>It means nothing of the kind. The System Interfaces volume of POSIX.1-2008
>is the part that defines the system calls.
There’s no “exec” system
Martijn Dekker dixit:
>And under what theory should 'exec' run a shell function?
Read up on what a “command” can be, pretty far up in
the Shell part.
Although I did not manage to get a pipeline or loop run.
Not sure if that’s a bug, but looking at the way statements
are parsed, probably not.
Op 25-07-17 om 23:41 schreef Thorsten Glaser:
> Martijn Dekker dixit:
>
>> This behaviour also appears to be contrary to the documentation in
>> mksh(1) ("The command is executed without forking, replacing the shell
>> process"). The test script below demonstrates that neither "exec"
>
> And
Martijn Dekker dixit:
>to be a bug in POSIX terms; 'exec' is supposed to launch a program that
>overlays the current shell[2], implying the program launched by 'exec'
>is always external to the shell.
The built-in utility is “the program implementing command”,
and, with exec, it is not returning
Martijn Dekker dixit:
>This behaviour also appears to be contrary to the documentation in
>mksh(1) ("The command is executed without forking, replacing the shell
>process"). The test script below demonstrates that neither "exec"
And this is utter nonsense, the builtin does replace the shell
11 matches
Mail list logo