lkml.org 
[lkml]   [2002]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: File open/create attibutes.
Date
From
> If a file exists with attributes, 0644, and it is opened with truncate
> and create with different attributes, it doesn't get those attributes.
> It's only if the file doesn't exist at all that it gets created with
> the new attributes.

This is correct behaviour. See IEEE Std 1003.1-2001. Its explicitly
specified that "If the file exists and is a regular file, and the file
is successfully opened O_RDWR or O_WRONLY, its length shall be truncated
to 0, and the mode and owner shall be unchanged"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.052 / U:0.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site