cygwin 1.4.0 - fork stops working ("permission denied")

George Morin
Thu Jul 29 19:11:00 GMT 2004

I am currently running an application which uses
fork/exec to run various background jobs. Every once
in a while (less than .5%) I've found that fork fails
and with strerror have received a permission denied
error. From that point on, all subsequent forks will
fail. In between my fork and exec the child process
changes directories and redirects stdin, stdout and
stderr. I have been unable to reproduce the above
behaviour in a scaled down program. I believe this
code has worked without incident on a unix box and has
only recently been discovered now that the code has
been ported to cygwin. I poked around google and the
archives and haven't found an acceptable solution. I
haven't noticed any unusual behaviour with my process
ids (I'm not using AOF) or system resources. I'm
running cygwin with Win2k and gcc 3.3.1. Can someone
please offer suggestions for further investigation or
perhaps a possible workaround? I have been able to use
spawn() instead of fork/exec and it seemed to work
fine but I don't know how to include the preprocessing
that was done between the fork and exec. Any help is

Thanks for your consideration,

Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage! 

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list