diff --git a/builtin/grep.c b/builtin/grep.c
index 9ce064ac1131e9a93383f568bb6f567791740b77..5c2ae94e5576f2e8af1f8509b789a67851db2598 100644 (file)
--- a/builtin/grep.c
+++ b/builtin/grep.c
#ifndef NO_PTHREADS
if (use_threads) {
- if (opt.pre_context || opt.post_context || opt.file_break ||
- opt.funcbody)
+ if (!(opt.name_only || opt.unmatch_name_only || opt.count)
+ && (opt.pre_context || opt.post_context ||
+ opt.file_break || opt.funcbody))
skip_first_line = 1;
start_threads(&opt);
}