Sv: posix_spawnp creates ghost processes

sten.kristian.ivarsson@gmail.com sten.kristian.ivarsson@gmail.com
Fri Apr 24 13:18:34 GMT 2020


> Greetings, Kristian Ivarsson via Cygwin!
> 
> > We're having a rather complex application and have noticed a rather
> > weird behaviour that I cannot find any information about
> 
> > We're using posix_spawnp and sometimes it creates extra "ghost-
> process(es)"
> > non visible to cygwin (via e.g. process status (ps)) but visible to
> > Windows (Task Manager)
> 
> Cygwin may spawn processes for housekeeping. F.e. if you "program &" in
> shell, an additional shell will be spawned to launch the "program" and
> notify the parent shell when it exits.
> 
> > The function doesn't fail and it doesn't report any error, but
> > sometimes (hard to reproduce deterministically) it creates one, or
> > more, extra processes of the same binary
> 
> > Have anyone noticed and/or have some information/ideas about this ?
> 
> Are these processes correctly exit when all childs exit?

Well, no

The issue is that due to some other issue, the main program hangs in some
kind of blocking mode (don't know why yet)

I exit that with SIGINT (via console and Ctrl+C) and there are a few
processes running that were created by posix_spawnp according to the CygWin
TTY, but according to Windows, some of the processes are duplicated
processes

If I kill -9 them in CygWin, the ones not visible are still running
according to Windows Task Manager

> --
> With best regards,
> Andrey Repin
> Friday, April 24, 2020 11:08:35
> 
> Sorry for my terrible english...




More information about the Cygwin mailing list