freetty

Version:
1.0
Description:
Finds the virtual console of all processes in /proc Outputs either a list of all free consoles(freetty -a) or just the one with the lowest number(just freetty). This is a useful compliment to 'doshell' and 'doprog' to e.g. start a program on the next available console. You might want to use this as an example of the proper way to parse /proc/PID/stat. It is a little tricky if you want to allow for the most general possible basename argv[0] in /proc/PID/cmdline. (i.e. commands with word separators according to fscanf).
Keywords:
available free virtual console tty doshell doprog /proc filesystem
Author:
chuckb@alice.wonderland.caltech.edu (Charles Blake)
Maintained-by:
chuckb@alice.wonderland.caltech.edu
Primary-site:
sunsite.unc.edu /pub/Linux/system/utils 1536 freetty.c.gz
Copying-policy:
Not for sale. Distribute freely.

Next Entry
Previous Entry