info shell PID - Minix

This is a discussion on info shell PID - Minix ; hi, I try F1 to show me process table I read: .... .... 82 1 35621 sh 7/7 8/8 1 9 180k --R--- fs .... .... but when I run: echo $$ result is: 84 but 84 is getty task ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: info shell PID

  1. info shell PID

    hi,
    I try F1 to show me process table
    I read:
    ....
    ....
    82 1 35621 sh 7/7 8/8 1 9 180k --R--- fs
    ....
    ....

    but when I run:

    echo $$

    result is:

    84

    but 84 is getty task number, not sh shell how I expect


    why ?




    thankyou


  2. Re: info shell PID

    Hi

    sacarde@gmail.com wrote:
    > hi,
    > I try F1 to show me process table
    > I read:
    > ...
    > ...
    > 82 1 35621 sh 7/7 8/8 1 9 180k --R--- fs
    > ...
    > ...
    >
    > but when I run:
    >
    > echo $$
    >
    > result is:
    >
    > 84
    >
    > but 84 is getty task number, not sh shell how I expect
    >
    >
    > why ?


    This is because PIDs and process numbers are not one and the same
    thing. Both are unique identifiers of running processes but they are
    mutually idependent. They serve different goals.

    Process numbers identify running processes in kernel mode and these
    process numbers could be effectively turned into the pointer to the
    proper slot in the process table that particular process occupies. See
    kernel/proc.h


+ Reply to Thread