[11827] in Athena Bugs

home help back first fref pref prev next nref lref last post

/usr/athena/etc/track, update.c

daemon@ATHENA.MIT.EDU (James H. Haynes)
Thu Mar 10 14:50:40 1994

Date: Thu, 10 Mar 1994 11:47:35 -0800 (PST)
From: "James H. Haynes" <haynes@cats.ucsc.edu>
To: bugs@MIT.EDU

In track, the file update.c contains this passage
        sprintf( temp,"%s_trk.tmp",to);

        if ( 0 <= ( fdt = open( temp, O_WRONLY | O_CREAT)));

        else if ( errno == ENOSPC) {

Some systems, e.g. Linux, require that the open() call have a third argument
for the file mode when O_CREAT is used; and for those that don't require it
I wonder what determines what it will be?  Anyway Linux without an 
explicit mode argument happens to create the file read-only, so the 
subsequent attempt to write it fails. I don't know what the correct mode 
might be, but I'm guessing 0755.

home help back first fref pref prev next nref lref last post