This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: setsid() does not call FreeConsole() even if all files are closed


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]