1 #define _FILE_OFFSET_BITS 64
10 int main(int argc, char *argv[])
18 printf("usage: %s FILE\n", argv[0]);
23 printf("Press <RETURN> to open file \"%s\": ", file);
26 if ((fd = open(file, O_RDWR)) == -1) {
31 if ((pid = fork()) == -1) {
38 printf("Press <RETURN> to rename file \"%s\" -> \"tmp\": ", file);
41 if (rename(file, "tmp") == -1) {
48 printf("Press <RETURN> to exit");
54 if (waitpid(pid, NULL, 0) != pid) {