Re: foreground & background

Top Page

Reply to this message
Author: Nicolas Kowalski
Date:  
To: guilde
Subject: Re: foreground & background
Hervé de Dianous <De.Dianous.Herve@???> writes:


[...]

> question : quel est le <n°>, est-ce le pid, le n° "d'ordre" dans le
> background ?


C'est la deuxième solution.


> Comment savoir combien et quel sont les process en bg ?


man bash, section "JOB CONTROL".

[...]

       The shell associates a job with each pipeline.  It keeps a
       table  of  currently  executing  jobs, which may be listed
       with the jobs command.   When  bash  starts  a  job  asyn­
       chronously  (in  the  background),  it  prints a line that
       looks like:


              [1] 25647


       indicating that this job is job number 1 and that the pro­
       cess  ID  of  the  last process in the pipeline associated
       with this job is 25647.  All of the processes in a  single
       pipeline  are  members of the same job.  Bash uses the job
       abstraction as the basis for job control.


Pour résumé, c'est la commande jobs avec bash. Je crois que c'est
pareil pour tcsh. Je ne connais pas les autres shells.


--
Nicolas