Welcome to the Linux Foundation Forum!

how does shell invoke a process?

How does Shell invoke a process, when an application is executed? If I do not run any command, is any IDLE thread running?

Comments

  • Posts: 216
    gr8linux wrote:
    How does Shell invoke a process, when an application is executed?
    Er, that's a little vague. Can you be more specific?
    If I do not run any command, is any IDLE thread running?
    If by IDLE thread, you mean a process pertaining to your shell, then yes. The shell process itself is running. E.g., on my box:
    1. [joeblow@mybox ~]$ ps -fwwu $USER
    2. UID PID PPID C STIME TTY TIME CMD
    3. joeblow 16405 16404 4 00:31 pts/2 00:00:00 -tcsh
    4. joeblow 16422 16405 0 00:31 pts/2 00:00:00 ps -fwwu joeblow
    The output of this ps command shows all running process that are owned by user "joeblow". The shell (tcsh) and the ps command itself are the only two processes joeblow is running, though the ps command will have already disappeared, of course. The shell is using PID (Process ID) 16405. Notice that the PPID (Parent PID) of the ps command is the PID of the tcsh shell.

    You can also use the tty command to see the filename of the terminal that your shell is using to connect to STDIN:
    1. [joeblow@mybox ~]$ tty
    2. /dev/pts/2
    which correlates to the pts/2 in the TTY column of the ps output above.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training