[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

What happens if you use a file while trying to upload it? Like

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 20
Thread images: 1

File: c4a.jpg (8KB, 238x192px) Image search: [Google]
c4a.jpg
8KB, 238x192px
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?
Thread posts: 20
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.