diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/legacy/getusershell.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/src/legacy/getusershell.c b/src/legacy/getusershell.c index 5fecdec2..1c5d98ec 100644 --- a/src/legacy/getusershell.c +++ b/src/legacy/getusershell.c @@ -25,8 +25,10 @@ char *getusershell(void)  	ssize_t l;  	if (!f) setusershell();  	if (!f) return 0; -	l = getline(&line, &linesize, f); -	if (l <= 0) return 0; +	do { +		l = getline(&line, &linesize, f); +		if (l <= 0) return 0; +	} while (line[0] == '#' || line[0] == '\n');  	if (line[l-1]=='\n') line[l-1]=0;  	return line;  }  | 
