summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2012-12-17 00:42:00 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-12-17 00:42:00 +0100
commita88920dd852273abd942e3bab2399e383180ca44 (patch)
tree375e8e3c8eeaa9ad2835708fe149c5ed7105ea48
parentcbe6f88b5ee7fa3394e916a8a7fe893066923b73 (diff)
Do not expand format name in posix format option
This fixes hang of ps -o user * utils/ps.c (parse_opt): When POSIX_FMT is set, do not lookup format name from OUTPUT_FMTS.
-rw-r--r--utils/ps.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/ps.c b/utils/ps.c
index 992b467d..2abb92aa 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -328,6 +328,8 @@ main(int argc, char *argv[])
/* Select an explicit format string if FMT_STRING is a format
name. This is done here because parse_enum needs STATE. */
{
+ if (posix_fmt)
+ break;
const char *fmt_name (unsigned n)
{
return