What happens if you use a file while trying to upload it?
Like listening to a song while trying to upload it to OneDrive at the same time :^)
>>58648680
Just werks
t. macos user
On GNU+Linux, nothing.
On Windows, the kernel segfaults.
>>58648680
depends...
it may bitch that the file is in use
>>58648680
It just works on any OS. Now please go back to the board you came from.
>>58648680
>using the smiley with a carat nose
Most of the time it will make the upload speed slower, but nothing other than that
When you use a file, it's copied to the RAM from wherever it's stored. The original can still be read, just not modified.
>>58650131
How do you Open a File bigger than your RAM
>>58650143
Don't have any files bigger than 64GB so don't know what you talking about
>>58648680
Well, first of all, there are two options:
1) the uploading program reads the whole file to memory and serves it from memory - no issues
2) the program opens the file and slowly keeps reading and sending
In option 2 (which is most likely, the following two things can happen):
a) the OS allows several processes to read the file at the same time, everything goes smooth
b) the OS does not allow a file to be shared (exclusive locking), in which case any other program will just get "access denied" until the uploading program closes the file
>>58648680
Your computer explodes :^)
>>58650999
this
It is up to whoever is using the file to request proper access right, i.e. the least restrictive you need
gotta hate when a program prevents reading from a file when it itself is merely reading from it
haha
>>58651148
>>58650999
I have never seen a program open a file with exclusive read lock.
Is that even possible?
>>58648680
Well, every file I use is being uploaded to Redmond with no problems so far, so I guess the answer is no issues at all OP :)
>>58648680
A file can be opened for reading by as many apps as necessary, so in your example, nothing will happen (nothing bad, anyway). A file can only be opened for writing by one app, however. If you try to save a text file from two opened editors at the (exact) same time, for instance, only one of them will get to actually save, and the other one will throw an error at you.
>>58651175
>Is that even possible?
CreateFile("my.file", GENERIC_READ, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); // On Windows
The Linux version is similar and makes use of open() and flock().
>>58651070
>using the smiley with a carat nose
>>58651295
Those parameters look very default, for such a bad behavior.
And the syscall name is misleading imo.
Why is Windows so shit?