01.01.2013 Views

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

AT&T UNIX™PC Unix System V Users Manual - tenox

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

TAM(3T) (AT&T UNIX PC only ) TAM(3T)<br />

according to which window is obscuring which other windows.<br />

The top window in the sequence is always completely visible.<br />

When a window is selected, it moves to the top, potentially overlaying<br />

windows that were previously visible. For windows with<br />

borders, row and column indicate the upper-left corner of the outside<br />

of the window, while height and width describe the dimensions<br />

of the inside of the window. Of the flags, only NBORDER<br />

applies to remote terminal windows. These flags are defined in<br />

window(7) in sysjwindow.h; note that tam.h calls both<br />

window.h and stdio.h .<br />

The iswind(} call determines if the terminal is local or remote.<br />

The differences in the way TAM provides windows for bit-mapped<br />

terminals versus remote terminals are described below.<br />

For the UNIX PC bit-mapped screen terminal, either the same process<br />

(application) or distinct processes can own simultaneous windows.<br />

The UNIX PC kernel remembers the covered portions of any<br />

window on a pixel basis. Each window is a separate device and<br />

can have its tty modes set independently of the other windows.<br />

Since file descriptors are used to access windows, a child process<br />

can inherit the open windows of its parent. All of the usual UNIX<br />

system calls apply, so an application can set the "close on exec"<br />

bit via fcntl(} to prevent access to particular windows by a child<br />

process.<br />

A process can also set up a child process so that its standard input<br />

and output point to a particular window by the usual techniqueclosing<br />

file descriptors 0 and 1 ( stdin and stdout) and duplicatiTJ.g<br />

the window's file descriptor. Window changed signals are sent to<br />

the process group associated with the particular window. Thus,<br />

by default, a parent process receives signals concerning windows<br />

created by its children. To prevent a parent from receiving these<br />

signals, use the setpgrp(} system call.<br />

In the case when the child process is unaware of windows, the following<br />

parameters should also be fixed: tty modes should be set to<br />

reasonable values and the signal SIGWIND should be ignored<br />

rather than caught. (SIGWIND is ignored by default.)<br />

A window which is owned by a particular application can be<br />

manipulated without the consent of the application. A signal<br />

(SIGWIND) is sent to the process group associated with the window<br />

to report any window changes. If a single process creates<br />

multiple windows, it receives the SIGWIND signal when any of its<br />

windows are changed. To respond appropriately to changes in its<br />

window, an application must catch SIGWIND (the default is to<br />

ignore SIGWIND) and issue a wgetstat() (described below) to<br />

determine which windows changed and in what ways.<br />

If an application changes characteristics of its own window, no signal<br />

is sent to the application. In fact, when any process in the<br />

process group associated with the window changes the window<br />

characteristics, no signal is sent. Some care should be taken when<br />

an application changes its own window, since this might defeat the<br />

wishes of the operator. For example, if a process makes its<br />

- 3 -

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!