fix using “-m” on the command line; spotted by G.raud <graud@gmx.com> on ML

This commit is contained in:
tg 2018-05-08 17:37:37 +00:00
parent 3560784571
commit 28637e55fd
4 changed files with 10 additions and 16 deletions

View File

@ -1,4 +1,4 @@
# $MirOS: src/bin/mksh/check.t,v 1.804 2018/05/07 00:07:18 tg Exp $
# $MirOS: src/bin/mksh/check.t,v 1.805 2018/05/08 17:37:33 tg Exp $
# -*- mode: sh -*-
#-
# Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
@ -30,7 +30,7 @@
# (2013/12/02 20:39:44) http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/regress/bin/ksh/?sortby=date
expected-stdout:
@(#)MIRBSD KSH R56 2018/05/07
@(#)MIRBSD KSH R56 2018/05/08
description:
Check base version of full shell
stdin:
@ -39,7 +39,7 @@ name: KSH_VERSION
category: !shell:legacy-yes
---
expected-stdout:
@(#)LEGACY KSH R56 2018/05/07
@(#)LEGACY KSH R56 2018/05/08
description:
Check base version of legacy shell
stdin:

12
jobs.c
View File

@ -23,7 +23,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.125 2018/01/05 20:08:34 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.126 2018/05/08 17:37:35 tg Exp $");
#if HAVE_KILLPG
#define mksh_killpg killpg
@ -169,12 +169,6 @@ static void tty_init_state(void);
void
j_init(void)
{
#ifndef MKSH_UNEMPLOYED
bool mflagset = Flag(FMONITOR) != 127;
Flag(FMONITOR) = 0;
#endif
#ifndef MKSH_NOPROSPECTOFWORK
(void)sigemptyset(&sm_default);
sigprocmask(SIG_SETMASK, &sm_default, NULL);
@ -190,8 +184,8 @@ j_init(void)
#endif
#ifndef MKSH_UNEMPLOYED
if (!mflagset && Flag(FTALKING))
Flag(FMONITOR) = 1;
if (Flag(FMONITOR) == 127)
Flag(FMONITOR) = Flag(FTALKING);
/*
* shl_j is used to do asynchronous notification (used in

4
main.c
View File

@ -34,7 +34,7 @@
#include <locale.h>
#endif
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.348 2018/04/27 16:54:45 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.349 2018/05/08 17:37:36 tg Exp $");
#ifndef MKSHRC_PATH
#define MKSHRC_PATH "~/.mkshrc"
@ -457,7 +457,7 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp)
/* Set this before parsing arguments */
Flag(FPRIVILEGED) = (kshuid != ksheuid || kshgid != kshegid) ? 2 : 0;
/* this to note if monitor is set on command line (see below) */
/* record if monitor is set on command line (see j_init() in jobs.c) */
#ifndef MKSH_UNEMPLOYED
Flag(FMONITOR) = 127;
#endif

4
sh.h
View File

@ -182,9 +182,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.861 2018/05/07 00:07:21 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.862 2018/05/08 17:37:37 tg Exp $");
#endif
#define MKSH_VERSION "R56 2018/05/07"
#define MKSH_VERSION "R56 2018/05/08"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES