Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 203561 Details for
Bug 274412
net-fs/nfs-utils: nfs resets sticky bit when writing to a file that already exists
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
simple test code
test.c (text/plain), 593 bytes, created by
SpanKY
on 2009-09-09 07:43:01 UTC
(
hide
)
Description:
simple test code
Filename:
MIME Type:
Creator:
SpanKY
Created:
2009-09-09 07:43:01 UTC
Size:
593 bytes
patch
obsolete
>#include <fcntl.h> >#include <stdio.h> >#include <stdlib.h> >#include <unistd.h> >#include <sys/stat.h> > >void do_ls(const char *file) >{ > struct stat st; > if (stat(file, &st)) > printf("%s does not exist\n", file); > else > printf("mode of %s: %o\n", file, st.st_mode); >} > >int main(int argc, char *argv[]) >{ > const char *file = argc > 1 ? argv[1] : "foo"; > int fd; > > unlink(file); > do_ls(file); > > fd = open(file, O_RDWR|O_CREAT|O_EXCL, 04540); > close(fd); > do_ls(file); > > fd = open(file, O_WRONLY|O_CREAT|O_TRUNC, 0777); > write(fd, "moo", 3); > close(fd); > do_ls(file); > > unlink(file); > > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 274412
: 203561