From: Craig Small Date: Fri, 16 Sep 2005 02:50:18 +0000 (+0000) Subject: flask linux cleanup in pstree X-Git-Tag: v22.11~105 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d55bc68a252a3473ca68e5cbc4dcd64e6d65578;p=psmisc flask linux cleanup in pstree --- diff --git a/ChangeLog b/ChangeLog index 8270932..7495b36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,8 @@ Changes in 21.7 * configure.in checks for tinfo library * both above fixes from ALTLinux + * Removed old FLASK_LINUX define in pstree + Changes in 21.6 diff --git a/doc/killall.1 b/doc/killall.1 index 9170f5f..ed169de 100644 --- a/doc/killall.1 +++ b/doc/killall.1 @@ -4,13 +4,17 @@ killall \- kill processes by name .SH SYNOPSIS .ad l .B killall -.RB [ \-Z , \-\-context ] +.RB [ \-Z , \-\-context +.IR pattern ] .RB [ \-e , \-\-exact ] .RB [ \-g , \-\-process\-group ] .RB [ \-i , \-\-interactive ] .RB [ \-q , \-\-quiet ] +.RB [ \-r , \-\-regexp ] .RB [ \-s , \-\-signal .IR signal ] +.RB [ \-u , \-\-user +.IR user ] .RB [ \-v , \-\-verbose ] .RB [ \-w , \-\-wait ] .RB [ \-I , \-\-ignore-case ] @@ -30,9 +34,10 @@ sends a signal to all processes running any of the specified commands. If no signal name is specified, SIGTERM is sent. .PP Signals can be specified either by name (e.g. \fB\-HUP\fP) or by number -(e.g. \fB\-1\fP). +(e.g. \fB\-1\fP) or by option \fB-s\fP. .PP -If the command name contains a slash (\fB/\fP), processes executing that +If the command name is not regular expression (option \fB-r\fP) +and contains a slash (\fB/\fP), processes executing that particular file will be selected for killing, independent of their name. .PP \fBkillall\fP returns a zero return code if at least one process has been diff --git a/src/pstree.c b/src/pstree.c index 7d7e7a5..b0a2316 100644 --- a/src/pstree.c +++ b/src/pstree.c @@ -647,11 +647,11 @@ read_proc (void) while ((dt = readdir(taskdir)) != NULL) { if ((thread=atoi(dt->d_name)) !=0) { if (thread != pid) { -#ifdef FLASK_LINUX - add_proc(threadname, thread, pid, st.st_uid, NULL, 0, sid); -#else /*FLASK_LINUX*/ +#ifdef WITH_SELINUX + add_proc(threadname, thread, pid, st.st_uid, NULL, 0, scontext); +#else /*WITH_SELINUX*/ add_proc(threadname, thread, pid, st.st_uid, NULL, 0); -#endif /*FLASK_LINUX*/ +#endif /*WITH_SELINUX*/ } } } @@ -790,7 +790,6 @@ main (int argc, char **argv) char termcap_area[1024]; char *termname; int c; - char *tmpstr; if (ioctl (1, TIOCGWINSZ, &winsz) >= 0) if (winsz.ws_col)