X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c1fa53426d4f4db5c1fe697d915d30247fd5d09a..b69c3463223ed1207861d7a9b0ec0a06064696ca:/tools/tesh2/examples/background.tesh diff --git a/tools/tesh2/examples/background.tesh b/tools/tesh2/examples/background.tesh deleted file mode 100644 index 4e663e7b9e..0000000000 --- a/tools/tesh2/examples/background.tesh +++ /dev/null @@ -1,71 +0,0 @@ - -$ rm -rf temp_testdir -$ mkdir temp_testdir -$ cd temp_testdir - -< #include -< #include -< #include -< #include -< #include -< #include -< -< #ifdef __MINGW32__ -< #define sleep _sleep -< #endif -< -< int main() { -< char buff[2048]; -< char* p; -< int got; -< int in; -< int w; -< int tgot = 0; -< -< sleep(1); -< -< if((in = open("tmp_fich",O_RDONLY|O_CREAT)) == -1){ -< perror("Cannot open tmp_fich"); -< exit(1); -< } -< -< while (1) { -< if((got = read(in,&buff,2048)) == -1) -< perror("Error while reading"); -< else if(got == 0 && tgot != 0) -< break; /* EOF */ -< -< if(!got) -< continue; -< -< p = buff; -< -< tgot += got; -< -< while(got) { -< if((w = write(1, p , got)) < 0) { -< perror("Error while writing"); -< exit(1); -< } -< -< p += w; -< got -= w; -< } -< } -< -< return 0; -< } -$ cat > delayed_cat.c - -$ gcc -Wall -o delayed_cat delayed_cat.c - -& ./delayed_cat -> TOTO - -< TOTO -$ cat > tmp_fich - -$ sleep 2 -$ cd .. -$ rm -rf temp_testdir -