small patch for numactl. Comments?

Larry McVoy lm at mcvoy.com
Tue Nov 14 14:08:08 UTC 2017


Hokay, took the suggestions, new patch for you.

--- numactl.1	2017-11-13 17:51:26.243473000 -0800
+++ numactl.1.lm	2017-11-14 06:03:30.564340000 -0800
@@ -107,6 +107,15 @@
 .El
 .Sh EXIT STATUS
 .Ex -std
+.Sh ENVIRONMENT
+.Nm
+sets the environment variable
+.Va NUMACTL=YES
+before running 
+.Ar cmd ...
+so programs that know they need to be run under 
+.Nm
+can check.
 .Sh EXAMPLES
 Create a
 .Pa /bin/sh
--- numactl.c	2017-11-13 16:18:36.134359000 -0800
+++ numactl.c.lm	2017-11-13 16:18:28.530953000 -0800
@@ -231,6 +231,7 @@
 			(void) set_numa_domain_cpuaffinity(cpu_domain,
 			    CPU_WHICH_PID, -1);
 
+		putenv("NUMACTL=YES");
 		errno = 0;
 		execvp(*argv, argv);
 		err(errno == ENOENT ? 127 : 126, "%s", *argv);


More information about the freebsd-arch mailing list