From: genesis AT hermes9 DOT cst DOT cnes DOT fr (Utilisateur genesis) Subject: Pipe with TCL/TK 7 Apr 1998 08:42:44 -0700 Message-ID: <199803311441.QAA11363.cygnus.gnu-win32@hermes7.cst.cnes.fr> To: gnu-win32 AT cygnus DOT com Cc: genesis AT hermes9 DOT cst DOT cnes DOT fr Hi, I use TCK/TK with GNUWIN32-B19. My application use Tcl functions libraries to send Tcl and Tk commands. I use pipe to interprocess communication, and I want to detect when a pipe may be read. For that I created pipe with "pipe" function, and started a function handler "action_pipe" (for execute a callback when pipe may be read). int fid[2]; Tcl_Channel pipe_channel; #ifdef _WIN32 HANDLE pipe_handle; #else int pipe_fd; #endif pipe (fid); #ifdef _WIN32 pipe_fd = get_osfhandle(fid[0]); #else pipe_fd = fid[0]; #endif pipe_channel = Tcl_MakeFileChannel ( pipe_fd TCL_READABLE ); Tcl_CreateChannelHandler ( pipe_channel, TCL_READABLE, action_pipe, (ClientData) fid[0] ); I've the same source code for SUN Solaris 2.5 and Windows NT GNUWIN32-B19. I've TCL/TK 8.0 on both platforms. I use -D_WIN32 compilation option on Windows. I've no problem on SUN platform, the handler "action_pipe" is activate when a pipe may be read. On Windows platform my application block when the TCl/TK event loop is started. I post this message to this mailing list because I saw some CYGNUS comments in TCL source code of GNU-B19 about pipe creation in tclWinPipe.c. I hope someone can help me to understand why in this example on WIN32 my application block. Otherwise, I search on WIN32 platform an other solution to detect when a pipe may be read. Thanks. Jean-Luc CAMES. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".