Job Control

   

Korn Shell: Unix and Linux Programming Manual, Third Edition, The
By Anatole Olczak

Table of Contents
Appendix G.  Pdksh Quick Reference


Job control is a process manipulation feature found in the Korn shell. It allows programs to be stopped and restarted, moved between the foreground and background, their processing status to be displayed, and more. To enable job control, the monitor option must be enabled. By default, this is enabled on systems that support the job control feature. When a program is run in the background, a job number and process id are returned.

Job Control Commands

bg

put current stopped job in the background

bg %n

put stopped job n in the background

fg

move current background job into the foreground

fg %n

move background job n into the foreground

jobs

display status of all jobs

jobs l

display status of all jobs along with process ids

jobs p

display process ids of all jobs

kill l

list all valid signal names

kill [?/span>signal] %n

send specified signal to job n (default 9)

set m, set o monitor

enable job control

stty [ ]tostop

allow/prevent background jobs from generating output

wait

wait for all background jobs to complete

wait %n

wait for background job n to complete

Ctl-z

stop the current job

Job Name Format

%n

job n

%+, %%

current job

%?/P>

previous job

%string

job whose name begins with string

%?string

job that matches part or all of string


       
    Top
     



    Korn Shell. Unix and Linux Programming Manual, Third Edition
    Korn Shell. Unix and Linux Programming Manual, Third Edition
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 177

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net