Does each process in a session get its input from and send its output to the terminal the session is connected to?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












This tutorial says the following:




Every session is tied to a terminal from which processes in the
session get their input and to which they send their output.




I think that this statement is incorrect, because say that I opened some program from the terminal (this program/process will be in the session connected to the terminal) and I redirected this program's stdout to a file. Now the program is not sending its output to the terminal.



Am I correct?







share|improve this question


























    up vote
    0
    down vote

    favorite












    This tutorial says the following:




    Every session is tied to a terminal from which processes in the
    session get their input and to which they send their output.




    I think that this statement is incorrect, because say that I opened some program from the terminal (this program/process will be in the session connected to the terminal) and I redirected this program's stdout to a file. Now the program is not sending its output to the terminal.



    Am I correct?







    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      This tutorial says the following:




      Every session is tied to a terminal from which processes in the
      session get their input and to which they send their output.




      I think that this statement is incorrect, because say that I opened some program from the terminal (this program/process will be in the session connected to the terminal) and I redirected this program's stdout to a file. Now the program is not sending its output to the terminal.



      Am I correct?







      share|improve this question














      This tutorial says the following:




      Every session is tied to a terminal from which processes in the
      session get their input and to which they send their output.




      I think that this statement is incorrect, because say that I opened some program from the terminal (this program/process will be in the session connected to the terminal) and I redirected this program's stdout to a file. Now the program is not sending its output to the terminal.



      Am I correct?









      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 11 '17 at 19:52









      Gilles

      507k12010031532




      507k12010031532










      asked Nov 11 '17 at 19:32









      user7681202

      237414




      237414




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote



          accepted










          The statement correctly describes the nominal case: open a terminal, run a shell in its own session in this terminal, and run further programs from the shell. You are correct that the statement is not true in general: any process can send output and receive input from anywhere, not just the session's controlling terminal. Shell redirections are the most common way to make a process's standard input or output be something other than the terminal.



          Don't expect a tutorial to cover all the cases. If it did, it would be incomprehensible.






          share|improve this answer




















            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f403940%2fdoes-each-process-in-a-session-get-its-input-from-and-send-its-output-to-the-ter%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote



            accepted










            The statement correctly describes the nominal case: open a terminal, run a shell in its own session in this terminal, and run further programs from the shell. You are correct that the statement is not true in general: any process can send output and receive input from anywhere, not just the session's controlling terminal. Shell redirections are the most common way to make a process's standard input or output be something other than the terminal.



            Don't expect a tutorial to cover all the cases. If it did, it would be incomprehensible.






            share|improve this answer
























              up vote
              0
              down vote



              accepted










              The statement correctly describes the nominal case: open a terminal, run a shell in its own session in this terminal, and run further programs from the shell. You are correct that the statement is not true in general: any process can send output and receive input from anywhere, not just the session's controlling terminal. Shell redirections are the most common way to make a process's standard input or output be something other than the terminal.



              Don't expect a tutorial to cover all the cases. If it did, it would be incomprehensible.






              share|improve this answer






















                up vote
                0
                down vote



                accepted







                up vote
                0
                down vote



                accepted






                The statement correctly describes the nominal case: open a terminal, run a shell in its own session in this terminal, and run further programs from the shell. You are correct that the statement is not true in general: any process can send output and receive input from anywhere, not just the session's controlling terminal. Shell redirections are the most common way to make a process's standard input or output be something other than the terminal.



                Don't expect a tutorial to cover all the cases. If it did, it would be incomprehensible.






                share|improve this answer












                The statement correctly describes the nominal case: open a terminal, run a shell in its own session in this terminal, and run further programs from the shell. You are correct that the statement is not true in general: any process can send output and receive input from anywhere, not just the session's controlling terminal. Shell redirections are the most common way to make a process's standard input or output be something other than the terminal.



                Don't expect a tutorial to cover all the cases. If it did, it would be incomprehensible.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 11 '17 at 19:52









                Gilles

                507k12010031532




                507k12010031532



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f403940%2fdoes-each-process-in-a-session-get-its-input-from-and-send-its-output-to-the-ter%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay