Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

*: Replace “user-specified code” with “user-specified program” #629

Merged
merged 1 commit into from
Nov 23, 2016

Conversation

wking
Copy link
Contributor

@wking wking commented Nov 18, 2016

In #466, I'd proposed replacing our old “user-specified process” with “user-specified code” to help distinguish between create (cloning the container process) and start (signaling the container process to execve or similar the user-specified $STUFF_FROM_THE_process_CONFIG). That PR was rejected, although the renaming proposed there had already landed via #462.

This PR attempts to find a common ground between “process” (preferred by maintainers in #466, but which I consider incorrect) and “code” (which maintainers found confusing). The Linux execve(2) says “program” and unpacks that to “a binary executable, or a script starting with a [shebang]”. proc(5) documents /proc/[pid]/exe by talking about “the executed command”. The POSIX exec docs call this the “process image” and talk about loading it from the “new process image file” (although they also sprinkle in a number of “program” references, apparently interchangeably with “process image”).

POSIX formally defines “command”, “executable file”, and “program”. The only reference to “process image” in the definitions is in the “executable file” entry. The “command” definition is focused on the shell, the “executable file” definition is focused on files, and the “program” definition talks about a “prepared sequence of instructions to the system”, so “program” seems like the best fit.

In [1], I'd proposed replacing our old "user-specified process" with
"user-specified code" to help distinguish between 'create' (cloning
the container process) and 'start' (signaling the container process to
execve or similar the user-specified $STUFF_FROM_THE_process_CONFIG).
That PR was rejected, although the renaming proposed there had already
landed via dd0cd21 (Add a 'status' field to our state struct,
2016-05-26, opencontainers#462).

This PR attempts to find a common ground between "process" (preferred
by maintainers in opencontainers#466 [2,3,4], but which I consider incorrect [5])
and "code" (which maintainers found confusing [3,4,6]).  The Linux
execve(2) says "program" and unpacks that to "a binary executable, or
a script starting with a [shebang]" [7].  proc(5) documents
/proc/[pid]/exe by talking about "the executed command" [8].  The
POSIX exec docs call this the "process image" and talk about loading
it from the "new process image file" (although they also sprinkle in a
number of “program” references, apparently interchangeably with
“process image”) [9].

POSIX formally defines "command" [11], "executable file" [12], and
"program" [13].  The only reference to "process image" in the
definitions is in the "executable file" entry.  The "command"
definition is focused on the shell, the "executable file" definition
is focused on files, and the "program" definition talks about a
"prepared sequence of instructions to the system", so "program" seems
like the best fit.

[1]: opencontainers#466
     Subject: runtime: Replace "user-specified process" with "user-specified code" in 'create'
[2]: opencontainers#466 (comment)
[3]: opencontainers#466 (comment)
[4]: opencontainers#466 (comment)
[5]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_295
[6]: opencontainers#466 (comment)
[7]: http://man7.org/linux/man-pages/man2/execve.2.html
[8]: http://man7.org/linux/man-pages/man5/proc.5.html
[9]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/exec.html
[10]: https://git.kernel.org/cgit/docs/man-pages/man-pages.git/
[11]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_104
[12]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_154
[13]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_306

Signed-off-by: W. Trevor King <wking@tremily.us>
@mrunalp
Copy link
Contributor

mrunalp commented Nov 22, 2016

LGTM

Approved with PullApprove

1 similar comment
@crosbymichael
Copy link
Member

crosbymichael commented Nov 23, 2016

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit 9ce258d into opencontainers:master Nov 23, 2016
@wking wking deleted the code-to-program branch January 6, 2017 05:44
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jan 6, 2017
…ecycle

After unifying the pre- and post-split hook lifecycle information
(this commit's first parent), merge master to pull in subsequent
mainline evolution.

Conflicts:
    runtime.md

The conflicts were primarily due to:

* dd0cd21 (Add a 'status' field to our state struct, 2016-05-26, opencontainers#462).
* 98f0bdf (Add some related docs links, 2016-10-25, opencontainers#596).
* c45ffb4 (*: Replace "user-specified code" with "user-specified
  program", 2016-11-18, opencontainers#629).

Signed-off-by: W. Trevor King <wking@tremily.us>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jan 6, 2017
…ecycle

After unifying the pre- and post-split hook lifecycle information
(this commit's first parent), merge master to pull in subsequent
mainline evolution.

Conflicts:
    runtime.md

The conflicts were primarily due to:

* dd0cd21 (Add a 'status' field to our state struct, 2016-05-26, opencontainers#462).
* 98f0bdf (Add some related docs links, 2016-10-25, opencontainers#596).
* c45ffb4 (*: Replace "user-specified code" with "user-specified
  program", 2016-11-18, opencontainers#629).

Signed-off-by: W. Trevor King <wking@tremily.us>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jan 6, 2017
…ecycle

After unifying the pre- and post-split hook lifecycle information
(this commit's first parent), merge master to pull in subsequent
mainline evolution.

Conflicts:
    runtime.md

The conflicts were primarily due to:

* dd0cd21 (Add a 'status' field to our state struct, 2016-05-26, opencontainers#462).
* 98f0bdf (Add some related docs links, 2016-10-25, opencontainers#596).
* c45ffb4 (*: Replace "user-specified code" with "user-specified
  program", 2016-11-18, opencontainers#629).

Signed-off-by: W. Trevor King <wking@tremily.us>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants