[Bug 192837] [patch] su(1) does not need to fork; it causes terminal problems

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue May 5 22:41:52 UTC 2015


--- Comment #3 from Kevin Barry <ta0kira at gmail.com> ---
(In reply to Jilles Tjoelker from comment #2)

"The fork is required so that PAM may be shut down correctly."

This seems reasonable. I assume that the PAM shutdown needs to happen after the
child exits?

"The setpgid code is there for csh. See SVN r153985 and previous for details.
Apparently csh does not make itself a process group leader when it is
interactive and job control is enabled. Fixing this is harder than it seems."

Is this a bug or a feature of csh? It seems a bit extreme to influence the
behavior of su based on an idiosyncrasy of one of the countless possible
commands that it can execute. It seems perfectly fine for csh to not become the
process group leader in that situation, so is there really a need to force that
to be the case when executing it from su? Would it break existing code/usage
to: 1) remove all of the pg-related code in su; and/or 2) update csh to make it
become process group leader if it isn't already the session leader?

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list