--- freem/src/init.c 2025/03/24 04:44:55 1.8 +++ freem/src/init.c 2025/04/03 16:58:34 1.9 @@ -1,5 +1,5 @@ /* - * $Id: init.c,v 1.8 2025/03/24 04:44:55 snw Exp $ + * $Id: init.c,v 1.9 2025/04/03 16:58:34 snw Exp $ * FreeM initialization * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: init.c,v $ + * Revision 1.9 2025/04/03 16:58:34 snw + * Make error message for shm_init error during initialization more friendly + * * Revision 1.8 2025/03/24 04:44:55 snw * Don't call ttyname on OS/2 * @@ -179,7 +182,15 @@ short init (char *namespace_name) retval = shm_init (shm_init_size); if (retval == SHMS_GET_ERR) { - fprintf (stderr, "init: error initializing shared memory [errno %d]\r\n", errno); + if (errno != 13) { + fprintf (stderr, "init: error initializing shared memory [errno %d]\r\n", errno); + } + else { + fprintf (stderr, "init: error attaching to environment -- does your user belong to the group that owns environment '%s'?\r\n", shm_env); + } + if (run_daemon == FALSE) { + set_io (UNIX); + } exit (1); }