Closed copy closed 5 months ago
I realised that the original version caused a regression: Using the latest version of the struct unconditionally would break older kernels (at runtime). I've instead changed it to use the first version of the struct. The current code doesn't use any of the new fields (set_tid
, set_tid_size
and cgroup
). If you'd like to check, sizeof caml_eio_clone_args
now matches CLONE_ARGS_SIZE_VER0
from linux/sched.h.
I've chosen to define this struct unconditionally, and rename it:
struct clone_args
, we'll get a compilation error if sched.h contains an older version of this structCLONE_PIDFD
is not defined in the linux-lts headers, but it is defined in musl, so it can't be used to determine ifstruct clone_args
is definedBut I'm open to suggestions for other fixes.
Fixes #737