returning the pinfo structure.
* fhandler.cc (fhandler_base::open_setup): Convert from inline.
* fhandler.h (fhandler_base::open_setup): Declare.
* fhandler_console.cc (fhandler_console::open_setup): Always call
fhandler_base::open_setup.
* fhandler_tty.cc (fhandler_pty_slave::open_setup): Ditto.
(fhandler_pty_master::open_setup): Ditto.
+2013-10-24 Christopher Faylor <me.cygwin2013@cgf.cx>
+
+ * external.cc (fillout_pinfo): If start_time is 0, wait a while before
+ returning the pinfo structure.
+
+ * fhandler.cc (fhandler_base::open_setup): Convert from inline.
+ * fhandler.h (fhandler_base::open_setup): Declare.
+ * fhandler_console.cc (fhandler_console::open_setup): Always call
+ fhandler_base::open_setup.
+ * fhandler_tty.cc (fhandler_pty_slave::open_setup): Ditto.
+ (fhandler_pty_master::open_setup): Ditto.
+
2013-10-24 Corinna Vinschen <corinna@vinschen.de>
* devices.in (dev_storage): Map /dev/zero and /dev/full to \Device\Null.
}
else if (nextpid || p->pid == pid || (winpid && thispid == (DWORD) pid))
{
+ /* It is possible that this pinfo is not completely set up yet. Wait
+ a while if so. */
+ for (int i = 0; i < 2000; i++)
+ if (p->start_time)
+ break;
+ else
+ Sleep (1);
ep.ctty = (p->ctty < 0 || iscons_dev (p->ctty)) ? p->ctty : device::minor (p->ctty);
ep.pid = p->pid;
ep.ppid = p->ppid;
return res;
}
+void
+fhandler_base::open_setup (int)
+{
+}
+
/* states:
open buffer in binary mode? Just do the read.
int open_with_arch (int, mode_t = 0);
virtual int open (int, mode_t);
- virtual void open_setup (int flags) { return; }
+ virtual void open_setup (int flags);
void set_unique_id () { NtAllocateLocallyUniqueId ((PLUID) &unique_id); }
int close_with_arch ();
set_flags ((flags & ~O_TEXT) | O_BINARY);
if (myself->set_ctty (this, flags) && !myself->cygstarted)
init_console_handler (true);
+ fhandler_base::open_setup (flags);
}
int
set_flags ((flags & ~O_TEXT) | O_BINARY);
myself->set_ctty (this, flags);
report_tty_counts (this, "opened", "");
+ fhandler_base::open_setup (flags);
}
void
char buf[sizeof ("opened pty master for ptyNNNNNNNNNNN")];
__small_sprintf (buf, "opened pty master for pty%d", get_minor ());
report_tty_counts (this, buf, "");
+ fhandler_base::open_setup (flags);
}
off_t