tcpdump mailing list archives

Re: SIGINFO on Windows


From: Guy Harris <guy () alum mit edu>
Date: Wed, 7 Jan 2004 11:38:36 -0800


On Jan 7, 2004, at 3:21 AM, Gisle Vanem wrote:

I'm trying to support the requestinfo() functionality in Windump,
but failed to find much info on SIGINFO. How often is this signal handler
called (on Linux/BSD)?

On Linux, not at all - it's not available on Linux (unless they picked it up for 2.6).

On BSD, it's generated when you type control-T on a terminal or in a terminal window in which tcpdump is running in the foreground; control-T generates SIGINFO. It's not delivered automatically on some time schedule.

To quote the TERMIOS(4) man page on Mac OS X (which is pretty much a standard BSD TERMIOS(4) man page):

   Special Characters
Certain characters have special functions on input or output or both.
     These functions are summarized as follows:

INTR Special character on input and is recognized if the ISIG flag (see the Local Modes section) is enabled. Generates a SIGINT signal which is sent to all processes in the foreground process group for which the terminal is the controlling terminal. If ISIG is set, the INTR character is discarded when processed.

                ...

The following special characters are extensions defined by this system
     and are not a part of 1003.1 termios.

                ...

STATUS Special character on input and is recognized if the ICANON flag is set. Receipt of this character causes a SIGINFO signal to be sent to the foreground process group of the terminal. Also, if the NOKERNINFO flag is not set, it causes the kernel to write a status message to the terminal that displays the current load average, the name of the command in the foreground, its process ID, the symbolic wait channel, the number of user and system sec- onds used, the percentage of cpu the process is getting, and the
             resident set size of the process.

                ...

   Local Modes
Values of the c_lflag field describe the control of various functions,
     and are composed of the following masks.

                ...

If NOKERNINFO is set, the kernel does not produce a status message when
     processing STATUS characters (see STATUS).

   Special Control Characters
The special control characters values are defined by the array c_cc. This table lists the array index, the corresponding special character,
     and the system default value.  For an accurate list of the system
     defaults, consult the header file <ttydefaults.h>.

           Index Name    Special Character    Default Value

                ...

           VINTR         INTR                 ^C

                ...

           VSTATUS       STATUS               ^T

-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:tcpdump-workers-request () tcpdump org?body=unsubscribe


Current thread: