* cygwin.din (ptsname_r): Export.
* fhandler.cc (fhandler_base::ptsname_r): Define. * fhandler.h (fhandler_base::ptsname): Delete. (fhandler_base::ptsname_r): Declare. (fhandler_pty_master::ptsname_r): Declare. * fhandler_tty.cc (fhandler_pty_master::ptsname): Delete. (fhandler_pty_master::ptsname_r): New reentrant function derived from previous ptsname. * syscalls.cc (ptsname_r): Implement new function with functionality similar to Linux. (ptsname): Use ptsname_r () to fill out buf. * include/cygwin/stdlib.h (ptsname_r): Declare. * include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 255 to reflect export of ptsname_r. * pinfo.cc (pinfo::wait): Return bool rather than int. * pinfo.h (info::wait): Ditto. (pinfo::reattach): Define !defined(_SIGPROC_H) case for consistency. * sigproc.cc (child_info_spawn::reattach_children): Use correct dwProcessId rather than pid when duplicating handle.
This commit is contained in:
@@ -975,10 +975,10 @@ _pinfo::dup_proc_pipe (HANDLE hProcess)
|
||||
}
|
||||
|
||||
/* function to set up the process pipe and kick off proc_waiter */
|
||||
int
|
||||
bool
|
||||
pinfo::wait ()
|
||||
{
|
||||
/* If rd_proc_pipe that means we're in an execed process which already has
|
||||
/* If rd_proc_pipe != NULL we're in an execed process which already has
|
||||
grabbed the read end of the pipe from the previous cygwin process running
|
||||
with this pid. */
|
||||
if (!rd_proc_pipe)
|
||||
@@ -989,13 +989,13 @@ pinfo::wait ()
|
||||
{
|
||||
system_printf ("Couldn't create pipe tracker for pid %d, %E",
|
||||
(*this)->pid);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!(*this)->dup_proc_pipe (hProcess))
|
||||
{
|
||||
system_printf ("Couldn't duplicate pipe topid %d(%p), %E", (*this)->pid, hProcess);
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1013,7 +1013,7 @@ pinfo::wait ()
|
||||
(*this)->pid, (*this)->dwProcessId, rd_proc_pipe);
|
||||
}
|
||||
|
||||
return 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user