Hello,

Petter Reinholdtsen, le sam. 03 mai 2025 05:34:11 +0200, a ecrit:
> The following patch got the package building.  I am quite unsure if the
> disabling of SA_NOCLDWAIT have side effects affecting boost library
> clients,

That will be fine: your changes are simply disabling the member in the
enum, so code that expect to be able to use no_child_wait will just fail
to build, just like we want.

> +Index: boost1.88-1.88.0/libs/process/src/ext/cmd.cpp
> +===================================================================
> +--- boost1.88-1.88.0.orig/libs/process/src/ext/cmd.cpp
> ++++ boost1.88-1.88.0/libs/process/src/ext/cmd.cpp
> +@@ -403,10 +403,10 @@ shell cmd(boost::process::v2::pid_type p
> + }
> + 
> + #else
> +-filesystem::path cmd(boost::process::v2::pid_type, error_code & ec)
> ++shell cmd(boost::process::v2::pid_type, error_code & ec)
> + {
> +   BOOST_PROCESS_V2_ASSIGN_EC(ec, ENOTSUP, system_category());
> +-  return "";
> ++  return {};
> + }
> + #endif

Indeed :)

But better also enable the linux case at line 214: GNU/Hurd does have
/proc/$pid/cmdline.

> +Index: boost1.88-1.88.0/libs/process/src/ext/env.cpp
> +===================================================================
> +--- boost1.88-1.88.0.orig/libs/process/src/ext/env.cpp
> ++++ boost1.88-1.88.0/libs/process/src/ext/env.cpp
> +@@ -246,7 +246,7 @@ env_view env(boost::process::v2::pid_typ
> +     return {};
> + }
> + 
> +-#elif (defined(__APPLE___) || defined(__MACH__)) && !TARGET_OS_IOS
> ++#elif (defined(__APPLE___) || defined(__MACH__)) && !TARGET_OS_IOS && 
> !defined(__gnu_hurd__)

Please rather fix the ifdef into

> +-#elif (defined(__APPLE__) && defined(__MACH__)) && !TARGET_OS_IOS

(no triple-'_', and && instead of ||), just like in the rest of the
source code.

> + env_view env(boost::process::v2::pid_type pid, error_code & ec)
> + {
> +@@ -309,7 +309,7 @@ env_view env(boost::process::v2::pid_typ
> +     return ev;
> + }
> + 
> +-#elif (defined(__linux__) || defined(__ANDROID__))
> ++#elif (defined(__linux__) || defined(__ANDROID__)) || defined(__gnu_hurd__)
> + 
> + env_view env(boost::process::v2::pid_type pid, error_code & ec)
> + {

[...]
> while the other changes seem safe enough.

Indeed, could you also submit them upstream?

Thanks!
Samuel

Reply via email to