What happens when you read a file while it is overwritten?How to make reading and writing the same file in the same pipeline always “fail”?Reading lines from a file with bash: for vs. whileMaking a process read a different file for the same filenameHow can I make a special file that executes code when read fromHow do you deliberately trigger a “text file busy” error?File contents created when openedRecovering a file that is overwritten with cat >Can you read an updated mtime, but when reading the contents they have yet to be updated?Cannot read regular file - IO operations blockWhat happens to file descriptors when the process is killed?What happens when I kill 'cp'? Is it safe and does it have any consequences?

How does one intimidate enemies without having the capacity for violence?

Approximately how much travel time was saved by the opening of the Suez Canal in 1869?

Is it possible to do 50 km distance without any previous training?

How is it possible to have an ability score that is less than 3?

Convert two switches to a dual stack, and add outlet - possible here?

How to draw a waving flag in TikZ

What do the dots in this tr command do: tr .............A-Z A-ZA-Z <<< "JVPQBOV" (with 13 dots)

What is the word for reserving something for yourself before others do?

Why "Having chlorophyll without photosynthesis is actually very dangerous" and "like living with a bomb"?

Maximum likelihood parameters deviate from posterior distributions

How much of data wrangling is a data scientist's job?

Do I have a twin with permutated remainders?

What does the "remote control" for a QF-4 look like?

Do infinite dimensional systems make sense?

strTok function (thread safe, supports empty tokens, doesn't change string)

Theorems that impeded progress

Which country benefited the most from UN Security Council vetoes?

tikz convert color string to hex value

How can bays and straits be determined in a procedurally generated map?

Why is Minecraft giving an OpenGL error?

What would happen to a modern skyscraper if it rains micro blackholes?

I'm flying to France today and my passport expires in less than 2 months

What's that red-plus icon near a text?

Important Resources for Dark Age Civilizations?



What happens when you read a file while it is overwritten?


How to make reading and writing the same file in the same pipeline always “fail”?Reading lines from a file with bash: for vs. whileMaking a process read a different file for the same filenameHow can I make a special file that executes code when read fromHow do you deliberately trigger a “text file busy” error?File contents created when openedRecovering a file that is overwritten with cat >Can you read an updated mtime, but when reading the contents they have yet to be updated?Cannot read regular file - IO operations blockWhat happens to file descriptors when the process is killed?What happens when I kill 'cp'? Is it safe and does it have any consequences?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








25















Suppose I read (cat) a file while another process is rewriting its contents. Is the output predictable? What would happen?










share|improve this question

















  • 3





    The behavior is undefined, you should never do this.

    – daisy
    Jun 26 '12 at 13:40











  • See this as well: How to make reading and writing the same file in the same pipeline always “fail”?.

    – codeforester
    yesterday

















25















Suppose I read (cat) a file while another process is rewriting its contents. Is the output predictable? What would happen?










share|improve this question

















  • 3





    The behavior is undefined, you should never do this.

    – daisy
    Jun 26 '12 at 13:40











  • See this as well: How to make reading and writing the same file in the same pipeline always “fail”?.

    – codeforester
    yesterday













25












25








25


3






Suppose I read (cat) a file while another process is rewriting its contents. Is the output predictable? What would happen?










share|improve this question














Suppose I read (cat) a file while another process is rewriting its contents. Is the output predictable? What would happen?







files






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 26 '12 at 13:38









LevenLeven

215148




215148







  • 3





    The behavior is undefined, you should never do this.

    – daisy
    Jun 26 '12 at 13:40











  • See this as well: How to make reading and writing the same file in the same pipeline always “fail”?.

    – codeforester
    yesterday












  • 3





    The behavior is undefined, you should never do this.

    – daisy
    Jun 26 '12 at 13:40











  • See this as well: How to make reading and writing the same file in the same pipeline always “fail”?.

    – codeforester
    yesterday







3




3





The behavior is undefined, you should never do this.

– daisy
Jun 26 '12 at 13:40





The behavior is undefined, you should never do this.

– daisy
Jun 26 '12 at 13:40













See this as well: How to make reading and writing the same file in the same pipeline always “fail”?.

– codeforester
yesterday





See this as well: How to make reading and writing the same file in the same pipeline always “fail”?.

– codeforester
yesterday










3 Answers
3






active

oldest

votes


















19














That depends on what the writer does.



If the writer overwrites the existing file, then the reader will see the new content when the writer overtakes the reader, if ever. If the writer and the reader proceed at variable speeds, the reader may alternatively see old and new content.



If the writer truncates the file before it starts to write, the reader will run against the end of the file at that point.



If the writer creates a new file then moves the new file to the old name, the reader will keep reading from the old file. If an opened file is moved or removed, the processes that have the file opened keep reading from that same file. If the file is removed, it actually remains on the disk (but with no way to open it again) until the last process has closed it.



Unix systems tend not to have mandatory locks. If an application wants to ensure that its writer component and its reader component don't step on each other's toes, it's up to the developer to use proper locking. There are a few exceptions where a file that's open by the kernel may be protected from writing by user applications, for example a loop-mounted filesystem image or an executable that's being executed on some unix variants.






share|improve this answer























  • Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

    – iruvar
    Aug 4 '14 at 20:27











  • @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

    – Gilles
    Aug 4 '14 at 21:46











  • what's the meaning of overtake here?

    – Victor Choy
    Oct 10 '16 at 7:02











  • @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

    – Gilles
    Oct 10 '16 at 17:50


















18














It's a classic race condition, so the outcome is unpredictable by definition.



Among others, it depends on




  • fopen(3) or open(2) write modes,

  • how/if the writer is buffering its output,

  • how the reader is reading the file,

  • the speed difference between the reader and writer,

  • the time difference between the read and writer's start.

  • And of course, on modern multi-core machines, things are complicated even more by other factors lower down (e.g. process scheduling).

If you need to be able to read a file while it's being rewritten, then you can make the writer make a transient copy of the file, modify that, then copy it back to the original file. This the way rsync does this, for instance. There are a number of ways to implement this, but no free lunch. Each method has its own shortcomings and repercussions.






share|improve this answer


















  • 1





    This answer is far more comprehensive than mine. Deleting my answer.

    – killermist
    Jun 26 '12 at 14:22


















0














Previous responders have more comprehensive explanations than this, but here's a trick that definitely works as well, pretty much doing exactly what he wants:



$ tail -f <filename>


Will show you the end of the file as it's being written. Handy if you want to pipe STDERR to a file but still see it in another terminal window, for example.






share|improve this answer








New contributor




Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f41668%2fwhat-happens-when-you-read-a-file-while-it-is-overwritten%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    19














    That depends on what the writer does.



    If the writer overwrites the existing file, then the reader will see the new content when the writer overtakes the reader, if ever. If the writer and the reader proceed at variable speeds, the reader may alternatively see old and new content.



    If the writer truncates the file before it starts to write, the reader will run against the end of the file at that point.



    If the writer creates a new file then moves the new file to the old name, the reader will keep reading from the old file. If an opened file is moved or removed, the processes that have the file opened keep reading from that same file. If the file is removed, it actually remains on the disk (but with no way to open it again) until the last process has closed it.



    Unix systems tend not to have mandatory locks. If an application wants to ensure that its writer component and its reader component don't step on each other's toes, it's up to the developer to use proper locking. There are a few exceptions where a file that's open by the kernel may be protected from writing by user applications, for example a loop-mounted filesystem image or an executable that's being executed on some unix variants.






    share|improve this answer























    • Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

      – iruvar
      Aug 4 '14 at 20:27











    • @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

      – Gilles
      Aug 4 '14 at 21:46











    • what's the meaning of overtake here?

      – Victor Choy
      Oct 10 '16 at 7:02











    • @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

      – Gilles
      Oct 10 '16 at 17:50















    19














    That depends on what the writer does.



    If the writer overwrites the existing file, then the reader will see the new content when the writer overtakes the reader, if ever. If the writer and the reader proceed at variable speeds, the reader may alternatively see old and new content.



    If the writer truncates the file before it starts to write, the reader will run against the end of the file at that point.



    If the writer creates a new file then moves the new file to the old name, the reader will keep reading from the old file. If an opened file is moved or removed, the processes that have the file opened keep reading from that same file. If the file is removed, it actually remains on the disk (but with no way to open it again) until the last process has closed it.



    Unix systems tend not to have mandatory locks. If an application wants to ensure that its writer component and its reader component don't step on each other's toes, it's up to the developer to use proper locking. There are a few exceptions where a file that's open by the kernel may be protected from writing by user applications, for example a loop-mounted filesystem image or an executable that's being executed on some unix variants.






    share|improve this answer























    • Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

      – iruvar
      Aug 4 '14 at 20:27











    • @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

      – Gilles
      Aug 4 '14 at 21:46











    • what's the meaning of overtake here?

      – Victor Choy
      Oct 10 '16 at 7:02











    • @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

      – Gilles
      Oct 10 '16 at 17:50













    19












    19








    19







    That depends on what the writer does.



    If the writer overwrites the existing file, then the reader will see the new content when the writer overtakes the reader, if ever. If the writer and the reader proceed at variable speeds, the reader may alternatively see old and new content.



    If the writer truncates the file before it starts to write, the reader will run against the end of the file at that point.



    If the writer creates a new file then moves the new file to the old name, the reader will keep reading from the old file. If an opened file is moved or removed, the processes that have the file opened keep reading from that same file. If the file is removed, it actually remains on the disk (but with no way to open it again) until the last process has closed it.



    Unix systems tend not to have mandatory locks. If an application wants to ensure that its writer component and its reader component don't step on each other's toes, it's up to the developer to use proper locking. There are a few exceptions where a file that's open by the kernel may be protected from writing by user applications, for example a loop-mounted filesystem image or an executable that's being executed on some unix variants.






    share|improve this answer













    That depends on what the writer does.



    If the writer overwrites the existing file, then the reader will see the new content when the writer overtakes the reader, if ever. If the writer and the reader proceed at variable speeds, the reader may alternatively see old and new content.



    If the writer truncates the file before it starts to write, the reader will run against the end of the file at that point.



    If the writer creates a new file then moves the new file to the old name, the reader will keep reading from the old file. If an opened file is moved or removed, the processes that have the file opened keep reading from that same file. If the file is removed, it actually remains on the disk (but with no way to open it again) until the last process has closed it.



    Unix systems tend not to have mandatory locks. If an application wants to ensure that its writer component and its reader component don't step on each other's toes, it's up to the developer to use proper locking. There are a few exceptions where a file that's open by the kernel may be protected from writing by user applications, for example a loop-mounted filesystem image or an executable that's being executed on some unix variants.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 27 '12 at 0:40









    GillesGilles

    546k12911101624




    546k12911101624












    • Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

      – iruvar
      Aug 4 '14 at 20:27











    • @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

      – Gilles
      Aug 4 '14 at 21:46











    • what's the meaning of overtake here?

      – Victor Choy
      Oct 10 '16 at 7:02











    • @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

      – Gilles
      Oct 10 '16 at 17:50

















    • Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

      – iruvar
      Aug 4 '14 at 20:27











    • @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

      – Gilles
      Aug 4 '14 at 21:46











    • what's the meaning of overtake here?

      – Victor Choy
      Oct 10 '16 at 7:02











    • @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

      – Gilles
      Oct 10 '16 at 17:50
















    Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

    – iruvar
    Aug 4 '14 at 20:27





    Gilles, does your explanation also apply in ftp/sftp scenarios? Say a process starts reading a transmitted ftp file while another version of the same file is overwriting it due to a new transmission.

    – iruvar
    Aug 4 '14 at 20:27













    @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

    – Gilles
    Aug 4 '14 at 21:46





    @1_CR Yes. In that case, the writer and the reader are the ftpd processes.

    – Gilles
    Aug 4 '14 at 21:46













    what's the meaning of overtake here?

    – Victor Choy
    Oct 10 '16 at 7:02





    what's the meaning of overtake here?

    – Victor Choy
    Oct 10 '16 at 7:02













    @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

    – Gilles
    Oct 10 '16 at 17:50





    @VictorChoy Standard meaning: to start behind/after someone else and at some point move ahead of them.

    – Gilles
    Oct 10 '16 at 17:50













    18














    It's a classic race condition, so the outcome is unpredictable by definition.



    Among others, it depends on




    • fopen(3) or open(2) write modes,

    • how/if the writer is buffering its output,

    • how the reader is reading the file,

    • the speed difference between the reader and writer,

    • the time difference between the read and writer's start.

    • And of course, on modern multi-core machines, things are complicated even more by other factors lower down (e.g. process scheduling).

    If you need to be able to read a file while it's being rewritten, then you can make the writer make a transient copy of the file, modify that, then copy it back to the original file. This the way rsync does this, for instance. There are a number of ways to implement this, but no free lunch. Each method has its own shortcomings and repercussions.






    share|improve this answer


















    • 1





      This answer is far more comprehensive than mine. Deleting my answer.

      – killermist
      Jun 26 '12 at 14:22















    18














    It's a classic race condition, so the outcome is unpredictable by definition.



    Among others, it depends on




    • fopen(3) or open(2) write modes,

    • how/if the writer is buffering its output,

    • how the reader is reading the file,

    • the speed difference between the reader and writer,

    • the time difference between the read and writer's start.

    • And of course, on modern multi-core machines, things are complicated even more by other factors lower down (e.g. process scheduling).

    If you need to be able to read a file while it's being rewritten, then you can make the writer make a transient copy of the file, modify that, then copy it back to the original file. This the way rsync does this, for instance. There are a number of ways to implement this, but no free lunch. Each method has its own shortcomings and repercussions.






    share|improve this answer


















    • 1





      This answer is far more comprehensive than mine. Deleting my answer.

      – killermist
      Jun 26 '12 at 14:22













    18












    18








    18







    It's a classic race condition, so the outcome is unpredictable by definition.



    Among others, it depends on




    • fopen(3) or open(2) write modes,

    • how/if the writer is buffering its output,

    • how the reader is reading the file,

    • the speed difference between the reader and writer,

    • the time difference between the read and writer's start.

    • And of course, on modern multi-core machines, things are complicated even more by other factors lower down (e.g. process scheduling).

    If you need to be able to read a file while it's being rewritten, then you can make the writer make a transient copy of the file, modify that, then copy it back to the original file. This the way rsync does this, for instance. There are a number of ways to implement this, but no free lunch. Each method has its own shortcomings and repercussions.






    share|improve this answer













    It's a classic race condition, so the outcome is unpredictable by definition.



    Among others, it depends on




    • fopen(3) or open(2) write modes,

    • how/if the writer is buffering its output,

    • how the reader is reading the file,

    • the speed difference between the reader and writer,

    • the time difference between the read and writer's start.

    • And of course, on modern multi-core machines, things are complicated even more by other factors lower down (e.g. process scheduling).

    If you need to be able to read a file while it's being rewritten, then you can make the writer make a transient copy of the file, modify that, then copy it back to the original file. This the way rsync does this, for instance. There are a number of ways to implement this, but no free lunch. Each method has its own shortcomings and repercussions.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jun 26 '12 at 14:21









    AlexiosAlexios

    14.7k15067




    14.7k15067







    • 1





      This answer is far more comprehensive than mine. Deleting my answer.

      – killermist
      Jun 26 '12 at 14:22












    • 1





      This answer is far more comprehensive than mine. Deleting my answer.

      – killermist
      Jun 26 '12 at 14:22







    1




    1





    This answer is far more comprehensive than mine. Deleting my answer.

    – killermist
    Jun 26 '12 at 14:22





    This answer is far more comprehensive than mine. Deleting my answer.

    – killermist
    Jun 26 '12 at 14:22











    0














    Previous responders have more comprehensive explanations than this, but here's a trick that definitely works as well, pretty much doing exactly what he wants:



    $ tail -f <filename>


    Will show you the end of the file as it's being written. Handy if you want to pipe STDERR to a file but still see it in another terminal window, for example.






    share|improve this answer








    New contributor




    Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.
























      0














      Previous responders have more comprehensive explanations than this, but here's a trick that definitely works as well, pretty much doing exactly what he wants:



      $ tail -f <filename>


      Will show you the end of the file as it's being written. Handy if you want to pipe STDERR to a file but still see it in another terminal window, for example.






      share|improve this answer








      New contributor




      Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















        0












        0








        0







        Previous responders have more comprehensive explanations than this, but here's a trick that definitely works as well, pretty much doing exactly what he wants:



        $ tail -f <filename>


        Will show you the end of the file as it's being written. Handy if you want to pipe STDERR to a file but still see it in another terminal window, for example.






        share|improve this answer








        New contributor




        Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        Previous responders have more comprehensive explanations than this, but here's a trick that definitely works as well, pretty much doing exactly what he wants:



        $ tail -f <filename>


        Will show you the end of the file as it's being written. Handy if you want to pipe STDERR to a file but still see it in another terminal window, for example.







        share|improve this answer








        New contributor




        Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 2 days ago









        Willoughby WillWilloughby Will

        11




        11




        New contributor




        Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Willoughby Will is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f41668%2fwhat-happens-when-you-read-a-file-while-it-is-overwritten%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            getting Checkpoint VPN SSL Network Extender working in the command lineHow to connect to CheckPoint VPN on Ubuntu 18.04LTS?Will the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayVPN SSL Network Extender in FirefoxLinux Checkpoint SNX tool configuration issuesCheck Point - Connect under Linux - snx + OTPSNX VPN Ububuntu 18.XXUsing Checkpoint VPN SSL Network Extender CLI with certificateVPN with network manager (nm-applet) is not workingWill the Linux ( red-hat ) Open VPNC Client connect to checkpoint or nortel VPN gateways?VPN client for linux machine + support checkpoint gatewayImport VPN config files to NetworkManager from command lineTrouble connecting to VPN using network-manager, while command line worksStart a VPN connection with PPTP protocol on command linestarting a docker service daemon breaks the vpn networkCan't connect to vpn with Network-managerVPN SSL Network Extender in FirefoxUsing Checkpoint VPN SSL Network Extender CLI with certificate

            Cannot Extend partition with GParted The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election ResultsCan't increase partition size with GParted?GParted doesn't recognize the unallocated space after my current partitionWhat is the best way to add unallocated space located before to Ubuntu 12.04 partition with GParted live?I can't figure out how to extend my Arch home partition into free spaceGparted Linux Mint 18.1 issueTrying to extend but swap partition is showing as Unknown in Gparted, shows proper from fdiskRearrange partitions in gparted to extend a partitionUnable to extend partition even though unallocated space is next to it using GPartedAllocate free space to root partitiongparted: how to merge unallocated space with a partition

            NetworkManager fails with “Could not find source connection”Trouble connecting to VPN using network-manager, while command line worksHow can I be notified about state changes to a VPN adapterBacktrack 5 R3 - Refuses to connect to VPNFeed all traffic through OpenVPN for a specific network namespace onlyRun daemon on startup in Debian once openvpn connection establishedpfsense tcp connection between openvpn and lan is brokenInternet connection problem with web browsers onlyWhy does NetworkManager explicitly support tun/tap devices?Browser issues with VPNTwo IP addresses assigned to the same network card - OpenVPN issues?Cannot connect to WiFi with nmcli, although secrets are provided