Begin2 Title = freetty Version = 1.0 Desc1 = Finds the virtual console of all processes in /proc Desc2 = Outputs either a list of all free consoles(freetty -a) Desc3 = or just the one with the lowest number(just freetty). Desc4 = This is a useful compliment to 'doshell' and 'doprog' Desc5 = to e.g. start a program on the next available console. Author = Charles Blake AuthorEmail = chuckb@alice.wonderland.caltech.edu Maintainer = Charles Blake MaintEmail = chuckb@alice.wonderland.caltech.edu Site1 = sunsite.unc.edu Path1 = /pub/Linux/system/utils File1 = freetty.c.gz FileSize1 = 1.5K Required1 = Linux 1.0 format '/proc' filesystem. Not tested on kernel versions Required2 = prior to 1.0, but will work as long as the 'tty' is the 7th field of Required3 = 'cat /proc/PID/stat'. For small binary: gcc -s -N -o freetty freetty.c Required4 = gzip (to uncompress file!), gcc (to compile program!) CopyPolicy1 = Not for sale. Distribute freely. Keywords = available free virtual console tty doshell doprog /proc filesystem Comment1 = You might want to use this as an example of the proper way to parse Comment2 = /proc/PID/stat. It is a little tricky if you want to allow for the Comment3 = most general possible basename argv[0] in /proc/PID/cmdline. Comment4 = (i.e. commands with word separators according to fscanf). RelFiles1 = none Entered = 04APR94 EnteredBy = Charles Blake CheckedEmail = chuckb@alice.wonderland.caltech.edu End