[jdk8u-dev] RFR: 8230305: Cgroups v2: Container awareness [v2]

Jonathan Dowland jdowland at openjdk.org
Tue Oct 18 10:17:23 UTC 2022


On Mon, 17 Oct 2022 16:40:32 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:

> Please use explicit parenthesis for PrintContainerInfo log lines throughout. Also with a space before and after the if

Sure! I'm assuming you mean spaces and braces like this


@@ -64,9 +64,10 @@ CgroupSubsystem* CgroupSubsystemFactory::create() {
    */
   cgroups = fopen("/proc/cgroups", "r");
   if (cgroups == NULL) {
-      if(PrintContainerInfo)
+      if (PrintContainerInfo) {
         tty->print_cr("Can't open /proc/cgroups, %s",
                                  strerror(errno));
+      }
       return NULL;
   }


(although I'm not sure what you mean by spaces before the `if`) and I'm working that through now.

-------------

PR: https://git.openjdk.org/jdk8u-dev/pull/127


More information about the jdk8u-dev mailing list