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: 1.7.9: spawn brakes reopening of serial port

Please, don't

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


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

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