From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f66ab,f48f2a0d5b971287 X-Google-Attributes: gidf66ab,public X-Google-Thread: fee84,f48f2a0d5b971287 X-Google-Attributes: gidfee84,public From: fpermuy@roble.datsi.fi.upm.es (Fernando Bellas Permuy ) Subject: Problems with netmsgserver Date: 1995/07/10 Message-ID: <3tr0r9$le1@panoramix.fi.upm.es>#1/1 X-Deja-AN: 106000900 distribution: world sender: fpermuy@roble (Fernando Permuy ) organization: Dpto. Arquitectura. Universidad Politecnica de Madrid is: OSF1 1.2 osc1.2-MK5.0.2 i386. I'm working with Mach 3.0, writing clients newsgroups: comp.unix.osf.osf1,comp.os.mach and servers which run in differents computers (linked by a network). I'm trying to install "netmsgserver", a name server which it comes with the standard installation. This server can send messages by the network. To install properly "netmsgserver" there are to take into account how Mach 3.0 works. The "Mach 3.0 Server Writer's Interfaces", appendix C Service Server, explains very well this point. This handook says: Each task inherits a set of registered ports upon creation (mach_port_registers). These are (send rights) for the name server, an environment server and the service server. All tasks in the system are intented to share the same name server, whereas different groups of tasks may have private environmet servers. All tasks need access to the same name server. Given a task whose registered name server port names the name server, all tasks derived from that task will inherit the port and share access to the name server. Unfortunately, being a task itself, the name server intializes itself after certain other tasks (such as the init process, /etc/init) run. Thus, most tasks, which derive indirectly from the init task will be missing the name server (and environmment server) port. Because of this, the port for the name server and environment server must be created (and registered with the init process) before the servers the ports name exist. This mechanism is provided by the "service" server. The privileged "service" server, /mach_servers/mach_init ( in my installation "mach_init" is not in /mach_servers, it is in /usr/mach3/sbin, is it a problem ? ), is run as the first process. It creates the port that will name the name and environment servers (as well it self) and forcibly registers them with its parent, thus placing these registered ports at the root of the task derivation tree. When the name or environment server is initialized, it registers itself with the service server, making the port created by the service server it own. Only the name and environment server have need for the service server. In my installation "mach_init" is not run as the first process. In fact, if you execute "ps -A", you don't see "mach_init". In the directory /sbin/rc3.d, there is a script to run "netmsgserver" when the operating system starts. The name of this script is _S90netmsgserver; if I rename it to S90netmsgserver, when the operating system starts, it tres to run this script, but "netmsgserver" fails, because "mach_init" is not run as the first process (in fact, "mach_init" is not run). Thus, I imagine that the solution to my problem is to do that "mach_init" is run as the first process, and rename _S90netmsgserver to S90netmsgserver. Is this correct ? If it is correct, how can I run "mach_init" as the first process ? I wrote an article to the "news" ( comp.unix.osf.osf1 and comp.os.mach ), asking for this question. I recived an answer saying: -------------------------------------------------------------------------- To get 'netmsgserver' running, the easiest way is to change the nanny configuration file: (/usr/etc/nanny.config, as under Mach 2.6 MSD) netmsgserver { RUNFILE=( ) SCRIPT=( /usr/etc/netmsgserver) UID=( msgsrv) GID=( network) NICE=( 0) ATTRIBUTES=( mach) } This gets the server running and checks whether it keeps running. ------------------------------------------------------------------------- This does not work in my installation. In my installation, it does not exist /usr/etc and the script to run "netmsgserver" is in /sbin/init.d. Thus, I wrote the next configuration file (/etc/nanny.config): netmsgserver { RUNFILE=( ) SCRIPT=( /sbin/init.d/netmsgserver start) UID=( msgsrv) GID=( network) NICE=( 0) ATTRIBUTES=( mach) This fails again. The "netmsgserver" does not start. The previous configuration file does not run "netmsgserver", and if "netmsgserver" would run, it would fail, because the "mach_init" is not run as the first process. Can somebody help me? My e-mail address is: fpermuy@roble.datsi.fi.upm.es Thanks in advance, Fernando.