From c16548b2a222c8ab43ae35651d069af4191836c6 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 11 Dec 2006 18:55:29 +0000 Subject: * child_info.h (child_info_spawn::__stdin): New element. (child_info_spawn::__stdin): Ditto. (CURR_CHILD_INFO_MAGIC): Regenerate. * dcrt0.cc (check_sanity_and_sync): Minor cleanup. (child_info_spawn::handle_spawn): Handle new __std* elements by calling move_fd. * dtable.cc (dtable::move_fd): Define new function. * dtable.h (dtable::move_fd): Declare new function. * fhandler.h (fhandler_pipe::popen_pid): Declare new element. * fhandler.h (fhandler_pipe::get_popen_pid): Define new function. * fhandler.h (fhandler_pipe::set_popen_pid): Ditto. * pipe.cc (fhandler_pipe::fhandler_pipe): Zero popen_pid. (fhandler_pipe::dup): Ditto. * spawn.cc (handle): Change second argument to bool. (spawn_guts): Accept __stdin/__stdout arguments and set them appropriately in child_info structure and in STARTUPINFO structure. * syscalls.cc (popen): New cygwin-specific implementation using spawn. (pclose): Ditto. * winsup.h (spawn_guts): Accommodate new arguments for spawn_guts. * fhandler.cc (fhandler_base::set_no_inheritance): Make second arg a bool. * fhandler.h (fhandler_base::set_no_inheritance): Ditto for declaration. * child_info.h (child_info::msv_count): Rename from the now-inappropriate "zero". (child_info_spawn::filler): Add filler to work around Vista bug. (child_info_fork::filler): Ditto. * dcrt0.cc (get_cygwin_startup_info): Remove "zero" check since it is now always filled out. * fork.cc (frok::parent): Move ch.zero manipulation to constructor. * spawn.cc (spawn_guts): Ditto. Remove _ch wrapper. * sigproc.cc (child_info::child_info): Initialize starter[]. * shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs. * shared_info.h (CURR_SHARED_MAGIC): Regenerate. --- winsup/cygwin/fhandler.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'winsup/cygwin/fhandler.h') diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index af267d92c..6e7bf4821 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -167,7 +167,7 @@ class fhandler_base void set_flags (int x, int supplied_bin = 0); bool is_nonblocking (); - void set_nonblocking (int yes); + void set_nonblocking (int); bool wbinary () const { return status.wbinset ? status.wbinary : 1; } bool rbinary () const { return status.rbinset ? status.rbinary : 1; } @@ -249,15 +249,15 @@ class fhandler_base virtual char *get_proc_fd_name (char *buf); virtual void hclose (HANDLE h) {CloseHandle (h);} - virtual void set_no_inheritance (HANDLE &h, int not_inheriting); + virtual void set_no_inheritance (HANDLE &, bool); /* fixup fd possibly non-inherited handles after fork */ - bool fork_fixup (HANDLE parent, HANDLE &h, const char *name); + bool fork_fixup (HANDLE, HANDLE &, const char *); virtual bool need_fixup_before () const {return false;} - int open_9x (int flags, mode_t mode = 0); - virtual int open (int flags, mode_t mode = 0); - int open_fs (int flags, mode_t mode = 0); + int open_9x (int, mode_t = 0); + virtual int open (int, mode_t = 0); + int open_fs (int, mode_t = 0); virtual int close (); int close_fs (); virtual int __stdcall fstat (struct __stat64 *buf) __attribute__ ((regparm (2))); @@ -520,8 +520,12 @@ protected: HANDLE writepipe_exists; DWORD orig_pid; unsigned id; +private: + pid_t popen_pid; public: fhandler_pipe (); + void set_popen_pid (pid_t pid) {popen_pid = pid;} + pid_t get_popen_pid () const {return popen_pid;} _off64_t lseek (_off64_t offset, int whence); select_record *select_read (select_record *s); select_record *select_write (select_record *s); -- cgit v1.2.3