Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!caen!ox.com!emv From: rees@pisa.ifs.umich.edu (Jim Rees) Newsgroups: comp.archives Subject: [apollo...] Re: XNTPD on an Apollo? Message-ID: <1991Jan2.031123.13992@ox.com> Date: 2 Jan 91 03:11:23 GMT References: <4eed9a07.1bc5b@pisa.ifs.umich.edu> Sender: emv@ox.com (Edward Vielmetti) Reply-To: rees@citi.umich.edu (Jim Rees) Followup-To: comp.sys.apollo,comp.protocols.time.ntp Organization: University of Michigan IFS Project Lines: 31 Approved: emv@ox.com (Edward Vielmetti) X-Original-Newsgroups: comp.sys.apollo,comp.protocols.time.ntp Archive-name: internet/ntp/xntp-apollo/1990-12-31 Archive: dabo.ifs.umich.edu:Readme.xntp [141.211.168.73] Original-posting-by: rees@pisa.ifs.umich.edu (Jim Rees) Original-subject: Re: XNTPD on an Apollo? Reposted-by: emv@ox.com (Edward Vielmetti) In article , hanche@imf.unit.no (Harald Hanche-Olsen) writes: I have been trying to port xntpd to the Apollo, and have run into trouble. What xntpd does is open a bunch of UDP sockets, and set them up to send an IO signal whenever input arrives by saying fcntl(fd, F_SETOWN, getpid()) I'm not sure why the manual says this is not implemented. It is. In Berkeley Unix, only sockets can be owned by a single process. If you try to set the owner of a tty to a process, it ends up being owned by the group that process is in. In Domain/OS, you can't set either sockets or ttys to be owned by an individual process. They are always owned by a process group. The problem with xntpd is that when you start it up, it doesn't divorce itself from its process group. So when it does the SETOWN, the socket ends up being owned by the group of the process that started xntpd, not the group that xntpd is currently in. You can fix this by adding a setpgrp(). ntpdate has the same problem. You can get a set of patches for xntpd from dabo.ifs.umich.edu.