38.2 - The dup2 System Call - A C tutorial for redirecting stdin and stdout using system calls.

Sdílet
Vložit
  • čas přidán 2. 06. 2024

Komentáře • 23

  • @diegod.8518
    @diegod.8518 Před 3 lety +18

    By far the best explanation on this topic I have found on the web. The way you visualize, reiterate, and add different examples while switching from code to illustrations is superb.

  • @alvinlu1512
    @alvinlu1512 Před 3 lety +8

    The best explanation I found online! Excellent!

  • @omartrkzi
    @omartrkzi Před 2 lety +2

    Finally some real English ...... God ! My ears ...

  • @moisesdevs
    @moisesdevs Před 3 lety +1

    great video! The world needs more teachers like you! Subscribed

  • @splodys
    @splodys Před 3 lety +1

    This is great content! keep up the great work, helped me immenselly!

  • @pochopsp
    @pochopsp Před 3 lety +2

    Great video and explaination. Now I get it all. Thx a lot

  • @YourName0729
    @YourName0729 Před 2 lety +2

    Thank you! Very clear and detailed!

  • @marcosmecatronikify
    @marcosmecatronikify Před rokem

    great explanation, thank you very much for sharing your knowledge!

  • @techlover714
    @techlover714 Před 3 lety

    Greatest work on youtube please make videos on multithreading. Your videos are magic.

  • @oussamakaddami4543
    @oussamakaddami4543 Před 3 lety

    Excellent!

  • @miquelmunoz611
    @miquelmunoz611 Před 2 lety

    you saved my semester

  • @narvik7587
    @narvik7587 Před 2 lety

    Thanks for your video. I am really appreciated 😭

  • @naibiyilidaer5580
    @naibiyilidaer5580 Před 2 lety

    Thank you so much!

  • @p_molnar
    @p_molnar Před rokem

    superb video! What program and device are you using to annotate the screen real time?

  • @malakggh
    @malakggh Před rokem

    Thank you so much, it's really amazing video.
    What application do you use for drawing on the screen ?

  • @chamarasilva7700
    @chamarasilva7700 Před 2 lety +2

    how to reset stdin/out to the terminal?

  • @aloonz8929
    @aloonz8929 Před 3 lety

    thank you!

  • @shelbys4252
    @shelbys4252 Před 3 lety

    I love u

  • @activelivingchallenger4298

    I don't think you need to use dup2 to implement redirect but I guess he is just using dup2 to show how it works. If you close stdout before calling open what the open function will do is find the lowest file descriptor available (which is now STDOUT) and use that instead of creating a new file descriptor which is FD3 in this example.

  • @shubhambhakuni9306
    @shubhambhakuni9306 Před 3 lety +2

    how to reset output to stdout?

    • @ibthajsami8497
      @ibthajsami8497 Před 2 lety

      same Question!

    • @e-leman
      @e-leman Před rokem

      you have to store it in another fd and dup2 to 1 again after you done

  • @jacobv4138
    @jacobv4138 Před 2 lety

    why do you sound like the guy from khanacademy?