Re: buzzed shell while running external editors
John Ellis <[email protected]> Thu, 14 Jul 2005 18:40:22 -0400
| Newsgroups | gmane.comp.gnome.apps.gqview.user |
|---|---|
| Message-ID | <[email protected]> |
Anton Tolchanov wrote: > > Hello everybody. > > I'm trying to use gqview on mac os x tiger, v10.4.2. Everything > seems to work properly except of extenal editors handling. When I run > jpegtran as an editor (like it is configured by default), gqview > executes the command, the jpegtran does its job, but does not return > control to gqview back, I see the grey "close" button and gqview > thinks that the external editor is still running. > > I've managed to make some investigation. In src/editors.c gqview > runs external editors via execvp() function through the shell > specified in COMMAND_SHELL. Using /bin/ps I see that when the editor > finishes executing, the shell still remains running. > > ryzh@pear:~>ps | grep gqview > 15384 p8 R+ 0:13.42 gqview . > > ryzh@pear:~>ps auxwj | grep 15384 > ryzh 15385 0.0 0,0 0 0 p8 Z+ 1jan70 0:00.00 15384 15384 210e9e0 1 (bash) > > I've tried to change COMMAND_SHELL from 'sh' to '/bin/bash', but > in vain. I've tried to run the command using execvp() directly > (simply removing the first 2 elements of argv[] array), but the > dialog window just does not show. I'm not a C programmer, so I just > don't know how to fix such issue. I've tried gqview 2.0.1, 2.1.1 and > version from CVS. Try adding "; exit" to the commands that hang to specifically request that the shell process quit when the script completes. Or perhaps the command is hung waiting for input from the command line, sometimes a command will appear to hang if it is waiting for input. The only fix for this is to call the command in a way that does not initiate or disables prompting for input (... or redirects needed data to the problematic command's standard input). Greetings, John -- John Ellis <[email protected]> http://gqview.sourceforge.net <GQview> | http://hideseek.sourceforge.net http://gqmpeg.sourceforge.net <GQmpeg> | <Preferences Hide and Seek> ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click