Christopher Faylor wrote:

[...]

The attached program demonstrates the assumption that only
stdin/stdout/stderr are open when the program is started.  A shell could
conceivably keep other fds open.

Try applying the below patch to gain the behavior that you want.

I had already tested a version which closes all descriptors closed and found no difference...

The problem was initially reported for smartd daemon in smartmontools Mailinglist.
As a quick workaround, I added FreeConsole() after setsid() to smartd.c


Christian


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

Reply via email to