All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Retanubun <richardretanubun@ruggedcom.com>
To: dash@vger.kernel.org
Subject: /bin/dash -c != /bin/bash -c with pgrep
Date: Tue, 24 Jan 2012 10:51:38 -0500	[thread overview]
Message-ID: <4F1ED38A.1050401@ruggedcom.com> (raw)

Hello,

my dash version is 0.5.5.1-7.4 (from debian/stable I believe)

I ran these two commands on a system where atftpd is not running and I am getting different results

/bin/dash -c "pgrep -f /usr/sbin/atftpd"; echo $?
-vs-
/bin/bash -c "pgrep -f /usr/sbin/atftpd"; echo $?

The dash version returns the PID of the grep itself and thus always succeeds.
The bash version works as expected.

Sorry if this is an old bug that is already fixed...
Has it been reported? (and fixed?) I saw a patch about the "-c" mode in  but it was reverted...

-- 
Richard Retanubun

             reply	other threads:[~2012-01-24 15:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-24 15:51 Richard Retanubun [this message]
2012-01-24 19:43 ` /bin/dash -c != /bin/bash -c with pgrep Jonathan Nieder
2012-01-24 20:17   ` Richard Retanubun
2012-01-24 20:53     ` Richard Retanubun
2012-01-24 21:03       ` Jonathan Nieder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F1ED38A.1050401@ruggedcom.com \
    --to=richardretanubun@ruggedcom.com \
    --cc=dash@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.