Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

If I'm writing a LaTeX file in linux I can recompile and the changes just 'appear' on the open PDF. If I use a bash script to edit a .txt file, I get the option reload it.

Not so in windows, which seems to prefer blocking my actions until the file is closed.

Why are the two so different? Is this a failing of the file system (I've not tried this in Linux on NTFS or FAT32, only ever one of the ext FSs)? Or is it something different?

share|improve this question
    
What PDF viewer you are using in Linux? And what in Windows? –  Serge Oct 2 '12 at 12:54
    
Uh, I don't know. The standard one for ubuntu? –  Pureferret Oct 2 '12 at 12:58
1  
It has nothing to do with the specific software @Serge, but with how Linux deals with files. For example, you can also start watching a video while it is downloading in Linux. –  terdon Oct 2 '12 at 12:58
3  
I was just referring to the lack of file locking in general in Linux systems. You don't get the "This file is in use by another program" error in Linux the way you do in windows. –  terdon Oct 2 '12 at 13:08
1  
Because it simplifies the programmer's task –  Serge Oct 2 '12 at 13:08

1 Answer 1

up vote 6 down vote accepted

What PDF viewer you are using in Linux? And what in Windows?

Uh, I don't know. The standard one for ubuntu?

This is the answer. It's the implementation defined behavior. It is completely feasible in Windows to design a viewer that will not lock the file from writing by other processes1 and monitor the original file for possible changes2 and prompt you if such changes occurs.

However, you may read this post to get an overview on how files are usualy managed in *nix like systems.


1 The programmer could specify dwShareMode=FILE_SHARE_WRITE when calling CreateFile().

2 FindFirstChangeNotification() on Windows, inotify on Linux

share|improve this answer
    
Then why not design one? –  Pureferret Oct 2 '12 at 13:14
    
There are a few valuable technical reason's to make a non-friendly (in context of this post) viewer. The viewer implemented, exist, and satisfies the needs of the majority of users. Who will pay for designing another viewer? –  Serge Oct 2 '12 at 13:55
    
Not only are there plenty of free file viewers or various kinds, they exist on linux already. I don't think that argument of "If it's not broken, then why re-invent the wheel." doesn't seem to hold. –  Pureferret Oct 2 '12 at 14:06
1  
Yes, I do not argue. The problem is that there should be some one with a will to do it himself or to pay for it. –  Serge Oct 2 '12 at 14:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.