Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions patches/3.1/process_c_tebako_spawn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# exactly as before). A planned bare name (the app payload's
# requires[].expose surface) retargets the exec pair to the store's
# runtime exe, rebuilds argv_buf/argv_str from the plan (the plan's
# argv[0] is the exe; ruby re-prepends it at exec), and applies the
# argv[0] rides as the child's own argv[0] at exec), and applies the
# plan's env ops (KEY=VALUE sets, bare KEY deletes) into
# env_modification. A named error raises — the spawn NEVER falls through
# to a host binary of the same name. The head runs BEFORE the darwin
Expand All @@ -69,7 +69,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -172,11 +172,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -189,7 +188,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
14 changes: 6 additions & 8 deletions patches/3.2/process_c_tebako_spawn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# exactly as before). A planned bare name (the app payload's
# requires[].expose surface) retargets the exec pair to the store's
# runtime exe, rebuilds argv_buf/argv_str from the plan (the plan's
# argv[0] is the exe; ruby re-prepends it at exec), and applies the
# argv[0] rides as the child's own argv[0] at exec), and applies the
# plan's env ops (KEY=VALUE sets, bare KEY deletes) into
# env_modification. A named error raises — the spawn NEVER falls through
# to a host binary of the same name. The head runs BEFORE the darwin
Expand All @@ -69,7 +69,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -172,11 +172,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -189,7 +188,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
12 changes: 5 additions & 7 deletions patches/3.2/process_c_tebako_spawn_msys.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -125,11 +125,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -142,7 +141,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
14 changes: 6 additions & 8 deletions patches/3.3/process_c_tebako_spawn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# exactly as before). A planned bare name (the app payload's
# requires[].expose surface) retargets the exec pair to the store's
# runtime exe, rebuilds argv_buf/argv_str from the plan (the plan's
# argv[0] is the exe; ruby re-prepends it at exec), and applies the
# argv[0] rides as the child's own argv[0] at exec), and applies the
# plan's env ops (KEY=VALUE sets, bare KEY deletes) into
# env_modification. A named error raises — the spawn NEVER falls through
# to a host binary of the same name. The head runs BEFORE the darwin
Expand All @@ -69,7 +69,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -172,11 +172,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -189,7 +188,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
12 changes: 5 additions & 7 deletions patches/3.3/process_c_tebako_spawn_msys.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -125,11 +125,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -142,7 +141,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
14 changes: 6 additions & 8 deletions patches/3.4/process_c_tebako_spawn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
# exactly as before). A planned bare name (the app payload's
# requires[].expose surface) retargets the exec pair to the store's
# runtime exe, rebuilds argv_buf/argv_str from the plan (the plan's
# argv[0] is the exe; ruby re-prepends it at exec), and applies the
# argv[0] rides as the child's own argv[0] at exec), and applies the
# plan's env ops (KEY=VALUE sets, bare KEY deletes) into
# env_modification. A named error raises — the spawn NEVER falls through
# to a host binary of the same name. The head runs BEFORE the darwin
Expand All @@ -69,7 +69,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -172,11 +172,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -189,7 +188,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
12 changes: 5 additions & 7 deletions patches/3.4/process_c_tebako_spawn_msys.patch
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,854 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,852 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -125,11 +125,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -142,7 +141,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
14 changes: 6 additions & 8 deletions patches/4.0/process_c_tebako_spawn.patch
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# exactly as before). A planned bare name (the app payload's
# requires[].expose surface) retargets the exec pair to the store's
# runtime exe, rebuilds argv_buf/argv_str from the plan (the plan's
# argv[0] is the exe; ruby re-prepends it at exec), and applies the
# argv[0] rides as the child's own argv[0] at exec), and applies the
# plan's env ops (KEY=VALUE sets, bare KEY deletes) into
# env_modification. A named error raises — the spawn NEVER falls through
# to a host binary of the same name. The head runs BEFORE the darwin
Expand All @@ -75,7 +75,7 @@ diff --git a/process.c b/process.c
index 97fa336..f55697e 100644
--- a/process.c
+++ b/process.c
@@ -2834,6 +2834,858 @@ rb_execarg_get(VALUE execarg_obj)
@@ -2834,6 +2834,856 @@ rb_execarg_get(VALUE execarg_obj)
return eargp;
}

Expand Down Expand Up @@ -178,11 +178,10 @@ index 97fa336..f55697e 100644
+}
+
+/* A planned spawn (spec 30 §2): the plan's exe becomes the exec pair;
+ argv_buf takes the plan's tokens AFTER argv[0] (ruby re-prepends the
+ program at exec from command_abspath — and the plan's argv[0] IS that
+ exe); argv_str's pointer vector is rebuilt into the new buffer exactly
+ as rb_exec_fillarg built it (the vector points INTO the buffer's
+ storage, so a new buffer means a rebuilt vector). */
+ argv_buf takes the plan's FULL argv, argv[0] included — the exec file
+ comes from command_abspath while the child's argv[0] is argv_buf's
+ first token (rb_exec_fillarg's exact layout); argv_str's pointers
+ point INTO the buffer, so a new buffer means a rebuilt vector. */
+static void
+tfs_spawn_plan_apply(struct rb_execarg *eargp, const char *exe,
+ const char *argv, size_t argv_len,
Expand All @@ -195,7 +194,6 @@ index 97fa336..f55697e 100644
+ VALUE av;
+ eargp->invoke.cmd.command_name = rb_str_new_cstr(exe);
+ eargp->invoke.cmd.command_abspath = rb_str_new_cstr(exe);
+ if (p < ep) p += strlen(p) + 1; /* the plan's argv[0] is the exe */
+ nbuf = hide_obj(rb_str_buf_new((ep - p) + 1));
+ while (p < ep) {
+ rb_str_buf_cat(nbuf, p, strlen(p) + 1);
Expand Down
Loading