From owner-freebsd-hackers Wed Feb 10 01:07:52 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA02392 for freebsd-hackers-outgoing; Wed, 10 Feb 1999 01:07:52 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA02387 for ; Wed, 10 Feb 1999 01:07:51 -0800 (PST) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.2/8.9.1) id BAA79553; Wed, 10 Feb 1999 01:07:44 -0800 (PST) (envelope-from dillon) Date: Wed, 10 Feb 1999 01:07:44 -0800 (PST) From: Matthew Dillon Message-Id: <199902100907.BAA79553@apollo.backplane.com> To: Christoph Kukulies Cc: Peter Wemm , Terry Lambert , Christoph Kukulies , hackers@FreeBSD.ORG Subject: Re: portability of shm, mmap, pipes and socket IPC References: <199902092246.PAA10658@usr02.primenet.com> <199902100403.MAA55849@spinner.netplex.com.au> <19990210085847.A11710@gil.physik.rwth-aachen.de> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Seems I have kicked off an avalanche :-) : :Someone was mentioning in an off-net discussion with some linux :guys, that when using timeval struct in select the time structure :members were dealt differently (units, offsets? - not clear what :my discussion partner meant, but it alarmed me a bit). But OTOH, :when XFree86 is running on both all I'd have to do is looking perhaps :in the XFree86 source.. : :-- :Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de Ah yes, I remember it well. select(fd, rfds, wfds, xfds, tv) The problem is that linux updates the timeval structure on return, telling you how much time is left. Many programs assumed that tv was const... i.e. not modified by the call, and so would initialize the structure once then use it multiple times. I don't know what linux does now, but most programs these days reinitialize tv on each select() call in order to work around any potential problem. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message