We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c8d33e commit b4d411cCopy full SHA for b4d411c
src/cmd/ksh93/sh/xec.c
@@ -2382,16 +2382,12 @@ int sh_exec(const Shnode_t *t, int flags)
2382
if(npv)
2383
{
2384
if(!sh.mktype)
2385
- {
+ { /*
2386
+ * Set the discipline function. If this is done in a subshell, the variable
2387
+ * must be scoped to the subshell before nvfun is set to the discipline.
2388
+ */
2389
if(sh.subshell && !sh.subshare)
- /*
- * When a variable is given a discipline function in
2390
- * a subshell, the variable must be scoped to the
2391
- * subshell before nvfun is set to the discipline.
2392
- */
2393
sh_assignok(npv, 1);
2394
- }
2395
cp = nv_setdisc(npv,cp,np,(Namfun_t*)npv);
2396
}
2397
if(!cp)
0 commit comments