DASH Shell discussions
 help / color / mirror / Atom feed
* /bin/dash -c != /bin/bash -c with pgrep
@ 2012-01-24 15:51 Richard Retanubun
  2012-01-24 19:43 ` Jonathan Nieder
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Retanubun @ 2012-01-24 15:51 UTC (permalink / raw)
  To: dash

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-24 21:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24 15:51 /bin/dash -c != /bin/bash -c with pgrep Richard Retanubun
2012-01-24 19:43 ` Jonathan Nieder
2012-01-24 20:17   ` Richard Retanubun
2012-01-24 20:53     ` Richard Retanubun
2012-01-24 21:03       ` Jonathan Nieder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox