DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing Deskshell commands

How environments are inherited

The parent of each thread, (i.e. the thread that created it), defines the environment that it inherits. The environment consists of the local variables and functions of the parent thread, and the name of the current directory. The new thread can also create its own set of local variables and functions, and its own current directory.

Each thread has a name, and when it is created, its name is inserted at the front of the local variable thread_name. Thus, within any thread, $thread_name(1) is the name of the thread, $thread_name(2) the name of the parent thread, and so forth. The name of a thread can be queried using query thread_info.

See also:


Next topic: System thread
Previous topic: Variable overriding

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003