On Wed, 30 Apr 2025 21:30:16 +0000
Christian Lupien wrote:
> On a recent system install, I tried to install cygserver by executing
>  cygserver-config
> but it failed saying that cygserver was already running.
> 
> I have done that same install for many years with success.
> 
> I tracked down the problem to the service discovery line inside the
> script (line 92) that uses:
>  ps -ef | grep -v grep | grep -q ${service_name}
> but since ps -f was changed in commit (2024-01-31)
> 1ce9756ee61e8dff5e3319851e14ebf310a0bdd8 to return the cmdline which it
> did not before, this fails because the script finds itself (cygserver-
> config is found by grep -q ${service_name})
> 
> I think the solution would be to remove the -f option to ps. So a patch
> would be like:
> --- cygserver-config.orig     2025-04-30 17:23:24.461779400 -0400
> +++ cygserver-config  2025-04-30 17:23:47.067576200 -0400
> @@ -89,7 +89,7 @@
>  _nt=`expr "${_sys}" : "CYGWIN_NT"`
>  
>  # Check for running cygserver processes first.
> -if ps -ef | grep -v grep | grep -q ${service_name}
> +if ps -e | grep -v grep | grep -q ${service_name}
>  then
>    echo
>    echo "There is a cygserver (${service_name}) already running. Nothing to 
> do, apparently."

Thanks for the report and patch snippet. I'll push the fix.

-- 
Takashi Yano <takashi.y...@nifty.ne.jp>

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to