mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-17 08:00:48 +01:00
Mend 'exit' without breaking 'exit 1'
*blush* %-\ Pointed out by: bruce
This commit is contained in:
parent
07aacf5723
commit
5ff36b379e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=18267
@ -33,7 +33,7 @@
|
|||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: main.c,v 1.6 1996/09/08 03:12:22 adam Exp $
|
* $Id: main.c,v 1.7 1996/09/12 02:23:33 bde Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
@ -339,10 +339,11 @@ exitcmd(argc, argv)
|
|||||||
int argc;
|
int argc;
|
||||||
char **argv;
|
char **argv;
|
||||||
{
|
{
|
||||||
|
extern int oexitstatus;
|
||||||
|
|
||||||
if (stoppedjobs())
|
if (stoppedjobs())
|
||||||
return 0;
|
return 0;
|
||||||
if (argc > 1)
|
exitstatus = (argc > 1) ? number(argv[1]) : oexitstatus;
|
||||||
exitstatus = number(argv[1]);
|
|
||||||
exitshell(exitstatus);
|
exitshell(exitstatus);
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user