]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: Return 0 from eval if no command was given.
authorjilles <jilles@FreeBSD.org>
Tue, 3 Aug 2010 22:17:29 +0000 (22:17 +0000)
committerjilles <jilles@FreeBSD.org>
Tue, 3 Aug 2010 22:17:29 +0000 (22:17 +0000)
commit184699830c5d6a596fdd993ea7f0c1a75283aae1
treeeef8a00dc349a605166c3a9e8d248bb1c4c1cb2a
parent25440e11e9a883c573d37a45aa87b288eb8d7368
sh: Return 0 from eval if no command was given.

This makes a difference if there is a command substitution.

To make this work, evalstring() has been changed to set exitstatus to 0 if
no command was executed (the string contained only whitespace).

Example:
  eval $(false); echo $?
should print 0.
bin/sh/eval.c
tools/regression/bin/sh/builtins/eval5.0 [new file with mode: 0644]