Reactions To A Busy File

free web hosting
Open Discussion > CONTRIBUTE > Computers > Programming Languages > C/C++ Programming

Reactions To A Busy File

kvarnerexpress
I just wanted to know if let's say you have a file called tempfile.dat and it is being used by dozens of parts of a script to transfer data, what happens if both scripts run at the same time and use the tempfile? will it throw a text file is busy error or will it patiently wait until a script is done using it before it uses it?

Because if i send information to the tempfile, then close it, then reopen it again to transfer back the information, I don't want the other script to start using it in the middle of that sequence or the results will be catastrophic.

Any info appreciated.


Reply

osknockout
(scripts? C++ forums? just wondering) Well it's kind of weird. For some apps a busy error comes, for other ones, it goes straight for it. I believe a system busy error will happen. By the way, I never heard of requests for the same file stacked by systems, so in either case, you'll get a system busy or those catastrophic results.

Reply

.hack//GU
what? tempfile.dat? if it is a script, then is C a script or at least can be used as script language? for all I know, C is a language that cannot be used as a script (not like VB that can be used as scripting)

anyway, if you ask for a script language nearing C, then PHP will come to mind.

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.

Recent Queries:-
  1. vb write to "busy file" - 209.80 hr back. (2)
Similar Topics

Keywords : reactions, busy, file

  1. Encrypting A File
    (5)
  2. File Format Encyclopedia Release 1.00
    (2)
    File Format Encyclopedia is FREEWARE so you can copy, read, use it freely but you can't modify
    it in any way!!!File Formats Encyclopedia A MUST HAVE for professional programmers!
    Over 300 formats layouts including: graphics,sound, animation, mods, database, text,executables,
    communication and much more ....
  3. Simple C File Handling In Action
    Small code snipet which covers most of basic file handling and navigat (4)
    Yesterday I suddenly got a lot of work. The same work we try to push off, yes you are right all
    formalities to get the code review incorporated and update all source code files with code review
    headers. Imagine if you need to open 300 files one by one and append code review headers at the
    end. Since most files are reviewed in groups of 20 to 30 files. We require one header to be placed
    in say 20 to 30 files. To simplify I went back to my class assignment days and wrote this small c
    utility to open all files passed on command line and open attach code review headers an....
  4. Local File Time To File Time()
    (0)
    I'm working on sending some certain data to a server. Part of the process in gathering this data
    is done by using GetLocalTime() to get the current local time, this local time must then be
    converted to a FILETIME structure. I'm trying to get this done properly in Python, however my
    problem is that I do not know what my data will look like when the local time is converted to file
    time. I don't have the necessary compiler on my PC to test the code (for reasons I'm not
    going to waste time explaining, my main PC is temporarily unuseable and I'm using a mu....
  5. Storing Bit Values In A File
    (1)
    Hello All, I am developing a utility for zipping and unzipping a file using the Huffman Algorithm.
    The code is implemented using 'C' language. I have finished coding for generating the
    appropriate bit code values for each of the symbols present in file and my next objective is to
    store the bit code values in a seperate file. As you all are aware, the smallest data type that is
    supported by C is the character which is 1 byte. Please can anybody suggest me on how to store the
    bit values generated as codes in a file? Thanks. ....
  6. Weird Characters Appending To File
    (2)
    Anytime I open a file and close it without changes, weird characters show up. Here is the code:
    PHP Code: inFile = fopen("serefs.dat","rb"); outFile = fopen("tempfile.dat","wb"); while
    (!feof(inFile)) { char line ; char timeline ; fgets(line,512,inFile);
    strncpy(timeline, line, 10); timeline = '\0'; int filetime;
    filetime = atoi(timeline); if(filetime > (realtime - 86400)) {
    fputs(line,outFile); } } fclose(inFile); fclose(outFile); //Put tempfile in buffe....
  7. Running An Extenal File
    how to (3)
    hi guyz i fairly new to c++ i started readnig a big book but it gonna take me a while to reach the
    last page and i need to do a menu quite fast so could any one of You help me with this
    /smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> : i need to know
    whith action will run an external file using the the app assigned to it in the windows shell (sort
    of like the "run" command in used in dos) or a brief source code with a button fireing some file to
    use as a tutorial /rolleyes.gif" style="vertical-align:middle" emoid=":rolleyes:"....

    1. Looking for reactions, busy, file

*RANDOM STUFF*





*SIMILAR VIDEOS*
Searching Video's for reactions, busy, file

*MORE FROM TRAP17.COM*
advertisement



Reactions To A Busy File



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute your information that might help someone here.
Ask your Doubts & Queries to get answers.. "Together, We enlight each other!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE