Path: utzoo!utgpu!watmath!clyde!att!ucbvax!TAURUS.BITNET!zifrony From: zifrony@TAURUS.BITNET Newsgroups: comp.unix.questions Subject: Re: remote background jobs Message-ID: <946@taurus.BITNET> Date: 11 Jan 89 18:27:21 GMT References: <1103@smidefix.liu.se> Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: zifrony%gemini.UUCP@CUNYVM.CUNY.EDU (Zifrony Doron) Organization: Tel-Aviv Univesity Math and CS school, Israel Lines: 36 In article <1103@smidefix.liu.se> pausv@liuida.BITNET writes: >Problem: How do I start a background server process on another machine? > I have tried using rsh, but it refuses to exit when I want it to. > I have also looked at rexec(), but it seems to require username > and password info to be availiable; a real pain in the ***. ... > >Question: How do I achieve this, without leaving rsh, in.rshd or > other processes waiting for the server to die ? ... > /Paul >--- >Paul Svensson psv@ida.liu.se SM5SJS Sorry for the late posting, but I've just reched this newsgroup. But now to business. I have encountered the same problem when trying to create a server process, on another machine via 'system("rsh ....")'. What I did, after consulting with the local wizard was: 1. close fds 0, 1 and 2. 2. fork() - the server runs as the child process. 3. the father commits suicide. This works just fine for me, but I guess it slows down the initialization. Later, the initiating process on machine A, and the server process on machine B talked using a socket. Try it, and may god be with you. Doron Zifrony E-mail: zifrony@taurus.bitnet or Msc. student zifrony@Math.Tau.Ac.IL Tel Aviv University Israel