Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!gorodish!guy From: guy%gorodish@Sun.COM (Guy Harris) Newsgroups: comp.windows.x Subject: Re: xmh and utime() Message-ID: <28784@sun.uucp> Date: Tue, 22-Sep-87 20:03:13 EDT Article-I.D.: sun.28784 Posted: Tue Sep 22 20:03:13 1987 Date-Received: Fri, 25-Sep-87 01:39:51 EDT References: <11687@decwrl.DEC.COM> Sender: news@sun.uucp Lines: 32 > According to man utime (on an Ultrix 2.0 system), if the second > argument to utime is a NULL, then the access and modification times of > the file are set to the current time. Sounds like a bug in Sun's utime... According to "man utime" (on a SunOS 3.x system): The "utime" call uses the `accessed' and `updated' times in that order from the "timep" vector to set the corresponding recorded times for "file". which says nothing whatsoever about a null pointer as the second argument. Sounds like a deficiency in your notion of what a "bug" is, or a deficiency in your notion of which manuals to check for descriptions of the behavior of SunOS (in case you weren't aware of it, the Ultrix documentation does *not* specify what SunOS does!).... The "null pointer as second argument" feature is a System V-ism. It is available - to a *limited* degree - in 3.2 and later releases; however, since the underlying system call ("utimes") does not support this notion, it can only change the times to the current time if you own the file. This will be changed in a future release to support a NULL second argument both to "utimes" and "utime"; the effect will be that, *to the best of the ability of all systems involved*, the accessed and modified times will be set to the current time. You must have write permission on the file or be the owner to do this; furthermore, if the file is being accessed over NFS, the file system code on the server must be willing to let you do this. (It's done by a special hack on top of the current NFS protocol, so most servers will probably *not* be willing to do so....) Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com