From: Keith R. J. W. <kr...@op...> - 2003-04-17 13:28:05
|
* Thomas Leonard <ta...@ec...> [17/04/2003 0857EDT]: > On Mon, Apr 14, 2003 at 05:13:22PM +0200, Karol Krenski wrote: > > > ROX-Session 0.1.18 -- used in combination w/ ROX-Filer and (probably) > > > any window manager -- will happily hang the X session if: > > > > > > 1) an app that wants to read from stdin is clicked on via > > > ROX-Filer > > > 2) said app is too braindead to realize that stdin is not > > > connected to a terminal > > > > Just rox, no ROX-Session: > > rox -s `which vim`; clicking on vim icon. X hangs. Started X from first > > console. I guess it's vim there, but ignores :wq. Killing vim causes [<vim > > defunc>] in process list. I have to restart X then. > > ROX-Filer explicitly closes stdin to try and prevent this, but I guess an > application could read from /dev/tty... Hmm ya I see the g_spawn_*() functions do this by default (close stdin), if I am not mistaken. You are correct about the apps reading /dev/tty; this is what these ncurses-based apps (vim and less in the two examples thus far) are doing. I will fiddle with the below-mentioned ioctl and see if I can't make this go away. > Perhaps something involving TIOCNOTTY (see tty(4)) would help? Anyone want > to have a play around? -- Keith R. John Warno [k r j w at optonline dot net] "It's very important for folks to understand that when there's more trade, there's more commerce." -- George "Dubuhyuh" Bush, Quebec City, Canada, April 21, 2001 |