From nobody Mon May 24 03:12:24 2021 X-Original-To: ports-bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 720B49E36CD for ; Mon, 24 May 2021 03:12:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FpMhR6k2rz3vRZ for ; Mon, 24 May 2021 03:12:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C05FA230A4 for ; Mon, 24 May 2021 03:12:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 14O3CNgu034065 for ; Mon, 24 May 2021 03:12:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 14O3CNlp034064 for ports-bugs@FreeBSD.org; Mon, 24 May 2021 03:12:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 208391] misc/mc SUBSHELL not working with /bin/sh Date: Mon, 24 May 2021 03:12:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: danfe@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: danfe@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: assigned_to bug_severity bug_status cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208391 Alexey Dokuchaev changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ports-bugs@FreeBSD.org |danfe@FreeBSD.org Severity|Affects Only Me |Affects Some People Status|Open |In Progress CC| |danfe@FreeBSD.org --- Comment #6 from Alexey Dokuchaev --- (In reply to Patrick McMunn from comment #2) > This is a longstanding bug. Well, it depends on one's definition of a bug. :-) Technically, ``env SHELL=3D/bin/sh mc'' tells users up-front that this combination is unsuppor= ted and refuses to work. It could probably emit less cryptic diagnostics, but that's about it. It's simply not possible to support /bin/sh as a subshell= in a way mc(1) deals with shells. When it launches a subshell, mc(1) installs so called "precmd" hook (execut= ed before each prompt) so the shell can report its current working directory b= ack to mc(1). Some shells are advanced enough and provide this feature out of = the box, e.g. for bash(1): > echo $PROMPT_COMMAND > pwd>&7;kill -STOP $$ For tcsh(1): > alias > ... > precmd echo $cwd:q >>/tmp/mc-danfe/mc.pipe.78491; kill -STOP $$ Other supported shells like dash(1) are not so advanced, but they support command expansion in the PS1, so this behavior can be emulated. Alas, our /bin/sh supports none of these. > I would suggest that the subshell build option be disabled by default We should not cripple package defaults just for the sake of ~1% of users who are confined to /bin/sh as their interactive shell. > or that, at the very least, an informational message be emitted that a us= er > either needs to use the -u option to start or that the user's default she= ll > should be changed Yes, that's what we should do. I'll take Mateusz's text but rework it, as = it's a bit too wordy while lacking technical details about this issue. --=20 You are receiving this mail because: You are the assignee for the bug.=