X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Mon, 24 Oct 2011 12:21:03 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: 1.7.9: spawn brakes reopening of serial port Message-ID: <20111024102103.GB14623@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <0C11C5BF0B29FD43A8D0250F711D497F89DEDBFEE2 AT ex01-ubitronix DOT ubitronix DOT local> <20111021105003 DOT GB2979 AT calimero DOT vinschen DOT de> <0C11C5BF0B29FD43A8D0250F711D497F89DEDBFF17 AT ex01-ubitronix DOT ubitronix DOT local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0C11C5BF0B29FD43A8D0250F711D497F89DEDBFF17@ex01-ubitronix.ubitronix.local> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Please, don't http://cygwin.com/acronyms/#TOFU On Oct 24 12:02, Manuel Wienand wrote: > Hallo Corinna, > > thanks for the response. Yes, you are right, I missed the fact that > the child process inherits the file descriptors. > > I took a look at the documentation of exec and just to be clear on the > descriptor/handler issue: > - file descriptor are passed down (basically always when calling the > 'open' function) > - socket descriptors are *not* passed down (not sure, wasn't in the > documentation) All descriptors are passed down, unless the close-on-exec flag has been set explicitely. > - handles of semaphores, mutexes, memory maps, message queues are > *not* passed down. Uh, "handles" sounds so much like a Windows concept... As for POSIX IPC objects, they are not inherited by exec'ed processes and have to be reopened. > - signal mask, scheduling policies (at leat when using SCHED_FIFO, > SCHED_RR or SCHED_SPORADIC) and directory streams are passed down > Is that correct? Not quite. For a good overview of what happens in execve, see http://www.kernel.org/doc/man-pages/online/pages/man2/execve.2.html Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple