Synchronization problem with posix_spawn

Peter Dons Tychsen donpedro@tdcadsl.dk
Thu Aug 20 05:40:37 GMT 2020


Hi Corinna,

> spawn alone doesn't cut it, due to the requirement to support the
> additional file actions and spawn atributes POSIX defines.  This
> would require a revamp of Cygwin's spawn functionality, which is
> already quite complicated.  So this is something I'm only willing
> to do in homeopathic doses.

OK. I can see that most of the processing of the options are done
seperately. We could to start with create a shortcut that calls
spawn[vpe]() instead if there are no options specified? That would
speed up most cases. Then we could add the extra cases later if needed.

Would that be an acceptable patch? 

The reason i am pushing for this is that allot of developers i interact
with get the feeling cygwin is slow. When i look into their cases it is
almost always because they use programs that end up calling fork()
allot (large shell scripts, makefiles, etc.). Almost all modern
versions of these programs have support for calling posix_spawn()
instead when creating processes, which would (if we changed it) speed
up these cases dramatically if it avoided fork(). It would simply make
cygwin more appealing to this group of users.

Thanks,

/pedro


More information about the Cygwin mailing list