Newbie - Process Management
chris.gonnerman at newcenturycomputers.net
Tue Jun 18 08:24:13 EDT 2002
As an addendum to my previous answer, I'd recommend you spend a little time
studying the online manuals and info files. (Personally I HATE the GNU info
system but hey, we're stuck with it. Perhaps if I was an EMACS user the
insane key bindings would make sense to me.) Python's os module is, after
all, an interface to the operating system, so more subtle or detailed
information must come from the operating system documentation.
To read the man page for the kill() system call:
man 2 kill
(at the shell prompt of course, not the Python prompt.) Access the info
but read the help right away because the key bindings are nasty. Current
documentation for GNU command-line tools will be in the info system, but
system calls are still in the man system.
Note that the first parameter to man can be omitted if you are sure that
the word you are looking for will be found in the right place (yeah, right).
On my system,
does get you the right page, but some other keywords may turn up first in
the TCL documentation for instance; that bites me regularly. The manual
sections are based on the numbering of the old AT&T Unix manuals. Typing
will tell you a bit about using the system, including this list of standard
1 Executable programs or shell commands
2 System calls (functions provided by the kernel)
3 Library calls (functions within system libraries)
4 Special files (usually found in /dev)
5 File formats and conventions eg /etc/passwd
7 Macro packages and conventions eg man(7), groff(7).
8 System administration commands (usually only for root)
9 Kernel routines [Non standard]
There may be additional sections which are non-standard on your system.
So, say you don't know where information on the kill() system call is:
gets this on my system:
SDL_KillThread (3) - Gracelessly terminates the thread.
pthread_kill (3thr) - handling of signals in threads
pthread_kill_other_threads_np (3thr) - terminate all threads in program
except calling thr
kill (1) - terminate a process
kill (2) - send signal to a process
killall (1) - kill processes by name
killall5 (8) - send a signal to all processes.
killchar (3x) [curs_termattrs] - curses environment query routines
killpg (2) - send signal to a process group
killpg (3) - send signal to all members of a process group.
killproc (8) - Send signals to processes by full path name
rotatelogs (8) - rotate Apache logs without having to kill the server
skill (1) - report process status
yes (1) - output a string repeatedly until killed
XKillClient (3x) - control clients
xkill (1x) - kill a client by its X resource
and it turns out that the kill in section 2 is the one we are looking for.
<<Sigh>> Everyone has to have their own help system; KDE and GNOME each have
built-in hypertext help which you will have to learn about to separately.
Chris Gonnerman -- chris.gonnerman at newcenturycomputers.net
More information about the Python-list