Comments (2)
++FILESYSCALL VAR6: [STARTED]
++FILESYSCALL VAR6: open mv.c
++FILESYSCALL VAR6: file handle 2
++FILESYSCALL VAR6: file handle 3
++FILESYSCALL VAR6: invoke read/write in a loop
#include "syscall.h"
#include "stdio.h"
#include "stdlib.h"
#define BUFSIZE 1024
char buf[BUFSIZE];
int main(int argc, char** argv)
{
int src, dst, amount;
if (argc!=3) {
printf("Usage: cp \n");
return 1;
}
src = open(argv[1]);
if (src==-1) {
printf("Open to open %s\n", argv[1]);
return 1;
}
creat(argv[2]);
dst = open(argv[2]);
if (dst==-1) {
printf("Unable to create %s\n", argv[2]);
return 1;
}
while ((amount = read(src, buf, BUFSIZE))>0) {
write(dst, buf, amount);
}
close(src);
close(dst);
unlink(argv[1]);
return 0;
}
++++FOIPLEENSFYISLCEA:L L[ SVTAARR6T:E DC]h
i+l+dO PpErNoFcIeLsEs: iodp eins t h e f i r s t f i l e t e s t 1 . i n
3
++++FOIPLEENSFYISLCEA:L Lo pVeAnR 6t:h eS UsCeCcEoSnSd
+f+iFlIeL EtSeYsStC2A.LiLn
Run the + + O P E N F I L E : o p e n t h e t h i r d f i l7et ht evsatr3i.aitni
ons
++++FOIPLEENSFYISLCEA:L L[ EVNADR]7
: [STARTED]
from cs162.
The problem didn't reoccur for a long time, so close this.
from cs162.
Related Issues (20)
- Hit Java exception of ArrayIndexOutOfBoundsException HOT 2
- A design problem raised by test case /test/testproj2/isprmgr.c, VAR8
- Hit java.lang.RuntimePermission createClassLoader while invoking exec many times HOT 2
- How to test that exit syscall releases all resource? HOT 1
- Hit java.lang.RuntimePermission createClassLoader while long run ISPRMGR VAR9 HOT 1
- If it would leak memory when user program doesn't invoke exit before end
- filesyscall.c VAR3 failed and some file handlers can't be closed HOT 1
- Filesyscall VAR8 failed HOT 1
- Filesyscall VAR9 failed
- Filesyscall VAR11 failed
- Filesyscall VAR7 failed
- Filesyscall VAR10 failed
- ++ISPRMGR VAR9 failed and system crashed
- LotterySchedulerVAR2 failed HOT 1
- Count tickets number incorrectly in LotteryQueue.pickNextThread HOT 1
- ThreadState.myResource didn't remove holder
- The total number of tickets in the system should be guaranteed not to exceed Integer.MAX_VALUE. HOT 2
- Hit AssertionFailureError while running case Thread.Mytester.LotterySchedulerVAR4
- executing system calls in nachos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cs162.