Add comment on umask in shm_event_loop.cc

After dealing w/ umask messing w/ these permissions lets just
document it. Leaving the default at 0770 right now because we
dont have a great way to deal with this in our startup scripts.

Change-Id: Ia9fd5db632d01a782fe61bf2bcadeff44d1d929d
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/events/shm_event_loop.cc b/aos/events/shm_event_loop.cc
index 4d46d1d..2ca27ac 100644
--- a/aos/events/shm_event_loop.cc
+++ b/aos/events/shm_event_loop.cc
@@ -40,8 +40,18 @@
 
 DEFINE_string(shm_base, "/dev/shm/aos",
               "Directory to place queue backing mmaped files in.");
+// This value is affected by the umask of the process which is calling it
+// and is set to the user's value by default (check yours running `umask` on
+// the command line).
+// Any file mode requested is transformed using: mode & ~umask and the default
+// umask is 0022 (allow any permissions for the user, dont allow writes for
+// groups or others).
+// See https://man7.org/linux/man-pages/man2/umask.2.html for more details.
+// WITH THE DEFAULT UMASK YOU WONT ACTUALLY GET THESE PERMISSIONS :)
 DEFINE_uint32(permissions, 0770,
-              "Permissions to make shared memory files and folders.");
+              "Permissions to make shared memory files and folders, "
+              "effected by the processes umask. "
+              "See shm_event_loop.cc for more details.");
 DEFINE_string(application_name, Filename(program_invocation_name),
               "The application name");