NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/42184: /bin/sh: stderr vs. command not found

The following reply was made to PR bin/42184; it has been noted by GNATS.

From: David Laight <>
Subject: Re: bin/42184: /bin/sh: stderr vs. command not found
Date: Wed, 14 Oct 2009 20:17:26 +0100

 On Wed, Oct 14, 2009 at 06:20:00PM +0000, wrote:
 > >Number:         42184
 > >Synopsis:       /bin/sh: stderr vs. command not found
 > /bin/sh doesn't print "xxx: not found" to stderr
 > in case xxx cannot be found.
 >    1 ~>cat /home/cheusov/tmp/                      
 >    #!/bin/sh
 >    bad_command_name 2>/dev/null
 Actually, it does print the error message to stderr.
 It does so in its own context, not that the command would run in.
 So the redirect on the line itself has no effect.
 The TOG spec:
 does seem to imply that redirection be done before command lookup!
 However this is all hard! The 'command environment' doesn't exist
 until later ...
 David Laight:

Home | Main Index | Thread Index | Old Index