NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/47733: su messes with foreground process group

>Number:         47733
>Category:       bin
>Synopsis:       su messes with foreground process group
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 09 12:20:00 +0000 2013
>Originator:     Taylor R Campbell <>
>Release:        NetBSD 6.99.17
System: NetBSD manticore.local 6.99.17 NetBSD 6.99.17 (RIAFAST) #3: Sun Mar 31 
15:07:34 UTC 2013  
Architecture: amd64
Machine: amd64

        su (with MKPAM=yes) messes with the foreground process group of
        its controlling terminal even if it is not in the foreground,
        with confusing consequences.

        It's not a priori clear to me why su needs to mess with the
        controlling terminal at all or leave an intermediate su process
        around until the subprocess exits, but it seems to have
        something to do with needing to bracket the subprocess by

        (We also have various crap in su to behave differently if the
        shell has `csh' in its name.  Whisky tango foxtrot?)


        0# sh
        1# { su -l riastradh -c : & wait; }
        [1]   Done                    su -l riastradh -c :
        1# [1] + Stopped (tty input)     sh


        Yes, please!

        Option 1: Figure out why we mess with the ctty and work around it.
        Option 2: Be more careful about the ctty state, like
        (Option 3: Build with MKPAM=no...)

Home | Main Index | Thread Index | Old Index