mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
let the "exit" command return status when it is implicit
This commit is contained in:
parent
3c56fa54d7
commit
279de1f97b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18154
@ -33,7 +33,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: main.c,v 1.4 1996/08/11 22:50:58 ache Exp $
|
||||
* $Id: main.c,v 1.5 1996/09/01 10:20:38 peter Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -339,11 +339,13 @@ exitcmd(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
extern int oexitstatus;
|
||||
|
||||
if (stoppedjobs())
|
||||
return 0;
|
||||
if (argc > 1)
|
||||
exitstatus = number(argv[1]);
|
||||
exitshell(exitstatus);
|
||||
exitshell(oexitstatus);
|
||||
/*NOTREACHED*/
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user