Merge branch 'wip/smcv/issue3157' into 'main'

tests: Don't assume that sh optimizes simple commands into exec

Closes #3157

See merge request GNOME/glib!3685
This commit is contained in:
Philip Withnall 2023-11-01 22:33:07 +00:00
commit 1969608db5

View File

@ -275,7 +275,7 @@ sleep_and_kill (int argc, char **argv)
/* Run sleep "forever" in a shell; this will trigger PTRACE_EVENT_EXEC */
g_ptr_array_add (args, g_strdup ("sh"));
g_ptr_array_add (args, g_strdup ("-c"));
g_ptr_array_add (args, g_strdup ("sleep infinity"));
g_ptr_array_add (args, g_strdup ("exec sleep infinity"));
g_ptr_array_add (args, NULL);
launcher = g_subprocess_launcher_new (G_SUBPROCESS_FLAGS_NONE);
proc = g_subprocess_launcher_spawnv (launcher, (const gchar **) args->pdata, &local_error);