Skip to content

Commit

Permalink
Clarify comment explaining the purpose of sp->pwdfd
Browse files Browse the repository at this point in the history
Also remove now unused xp variable.
  • Loading branch information
JohnoKing committed Dec 18, 2024
1 parent 9f7895a commit 51f027c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cmd/ksh93/sh/subshell.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static struct subshell
int rand_last; /* last random number from $RANDOM in parent shell */
char rand_state; /* 0 means sp->rand_seed hasn't been set, 1 is the opposite */
uint32_t srand_upper_bound; /* parent shell's upper bound for $SRANDOM */
int pwdfd; /* file descriptor for PWD */
int pwdfd; /* parent shell's file descriptor for PWD */
} *subshell_data;

static unsigned int subenv;
Expand Down Expand Up @@ -530,7 +530,6 @@ Sfio_t *sh_subshell(Shnode_t *t, volatile int flags, int comsub)
sh.comsub = comsub;
if(!sh.subshare)
{
struct subshell *xp;
char *save_debugtrap = 0;
sp->pwd = sh_strdup(sh.pwd);
sp->pwdfd = sh.pwdfd;
Expand Down

0 comments on commit 51f027c

Please sign in to comment.