This is the mail archive of the cygwin-developers@cygwin.com 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]

dup_proc_pipe


         * pinfo.cc (_pinfo::dup_proc_pipe): Can't close proc pipe when
execing
         or we will suffer an exit code race.
 
Even when you will wait for yourself, as a top Cygwin process?
 
In the same vein, if the last process in a chain is a Windows
process, :exit gets called by the Cygwin parent with norecord, so the
state is not set to PID_EXITED and the logical parent is not alerted.
It's not critical, but it would be easy to make use of the return
value of ciresrv.sync, which could be placed in the P_OVERLAY case.

Also, PID_EXITED is used in the case
(!created && createit && (procinfo->process_state & PID_EXITED)
but it's not a sure way of handling the transient because the new
process may not have access rights to the old pinfo, leading to a
hard failure. To minimize the likelihood of such an event, one could
call myself->release () before ExitProcess. 
The order is already optimized in remove_proc.

Pierre


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