Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jan 2006 17:25:14 +0800
From:      David Xu <davidxu@freebsd.org>
To:        Brian Somers <brian@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/usr.bin/su su.c
Message-ID:  <43B8F17A.7030607@freebsd.org>
In-Reply-To: <200601020851.k028pMLR051063@repoman.freebsd.org>
References:  <200601020851.k028pMLR051063@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Brian Somers wrote:
> brian       2006-01-02 08:51:21 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     usr.bin/su           su.c 
>   Log:
>   Remove broken code that mucks about with tcsetpgrp() -- even if
>   su isn't the foreground process.  Hopefully this won't break PAM,
>   but I couldn't find any useful information about ache's theory
>   that it will.
>   
>   Specifically, this change fixes the following:
>   
>       # sh
>       # echo $$
>       # su - root -c id &
>       # echo $$
>   
>   The PID output changes as su seems to be kill -STOP'ing itself
>   and catching the parent shell in the process.  This is especially
>   bad if you add a ``su - user -c command &'' to an rc script!
>   
>   Sponsored by:           Sophos/Activestate
>   Not objected to by:     des
>   
>   Revision  Changes    Path
>   1.77      +0 -7      src/usr.bin/su/su.c
> 
> 

Oh, you obviously have not checked history (discussion between bde@ and
me), please try following code:

%sh
$ su
apple# kill -STOP $$



^C^C^C






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43B8F17A.7030607>