Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 184541 Details for
Bug 273921
rename(a,b) does not replace b if a and b are hard linked
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Rename syscall problem demonstration
rename-test.c (text/x-csrc), 709 bytes, created by
David Shaw
on 2007-09-01 18:16:46 UTC
(
hide
)
Description:
Rename syscall problem demonstration
Filename:
MIME Type:
Creator:
David Shaw
Created:
2007-09-01 18:16:46 UTC
Size:
709 bytes
patch
obsolete
>#include <stdio.h> >#include <unistd.h> >#include <sys/types.h> >#include <sys/stat.h> >#include <fcntl.h> >#include <string.h> >#include <errno.h> > >int >main(int argc,char *argv[]) >{ > int fd; > struct stat foostat,barstat; > > fd=creat("foo",0777); > if(fd==-1) > { > printf("Can't creat: %s\n",strerror(errno)); > _exit(1); > } > > close(fd); > > printf("Created file foo\n"); > > if(link("foo","bar")==-1) > { > printf("Can't link: %s\n",strerror(errno)); > _exit(1); > } > > printf("Linked foo to bar\n"); > > if(rename("foo","bar")==-1) > { > printf("Can't rename: %s\n",strerror(errno)); > _exit(1); > } > > printf("Successfully renamed foo to bar - or did I?\n"); > > 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 273921
: 184541