On Tue, 31 Jul 2007 23:07:37 +0100 Simon Huggins <[EMAIL PROTECTED]> wrote:
> On Tue, Jul 31, 2007 at 07:32:19PM +0200, Andrea Bolognani wrote: > > Ok, I found the problem; while it is not a bug per se, it breaks other > > programs, since it doesn't follow the expected behavior. > > > xfce4-terminal forks to a new window at startup: this causes the > > calling program -- in my case Sylpheed, but I'm sure this is true for > > other mail clients as well -- to think the editing session is > > finished, and to continue its tasks. > > Eh? This doesn't make any sense. It doesn't fork at all. > > > So it should at least provide a command line switch (like gvim's -f > > option) to avoid forking, and this switch should be active by default > > in the wrapper script, since that script it's AFAIK supposed to > > provide an xterm-compatible interface, and xterm doesn't fork at > > startup. > > Can you explain what you mean? forking at startup doesn't make sense to > me since xfce4-terminal doesn't do that. > > I still think this is a bug in sylpheed. Sorry, I don't know xfce4-terminal's code, so maybe my explanation will be inaccurate, or maybe totally wrong. What I can see, as a user, is that, if I run xterm (or rxvt, or gnome-terminal, they behave the same) from a terminal window, the shell is blocked because the new terminal process is in the foreground, and the shell waits for it to complete before giving me back the prompt. If I do the same with xfce4-terminal, I immediately get the prompt back: this is because (my guess of course) xfce4-terminal forks on startup, or does a similar trick to run in the background; this causes the shell (or Sylpheed) to think the process terminated, and returns to do its stuff. GVim behaves the same way: if you launch it from a terminal, it forks to the background and you immediately get the prompt back; if you need it to stay on foreground until it really finishes, like for example when you use it as external editor in a mail client, you can use the -f (or --nofork) switch to prevent it from forking in the background. I'm pretty sure this is the problem. As I said, this is *not* really a bug, just a feature you should be able to turn off, since it breaks Sylpheed and potentially other mail clients and programs which wait for xfce4-terminal to exit. It is also different from the expected behavior, since xterm, rxvt and gnome-terminal all stay in the foreground, and xterm is AFAICT the reference implementation for terminals. -- KiyuKo <eof AT kiyuko DOT org> Resistance is futile, you will be garbage collected.
pgp2P61V9yapv.pgp
Description: PGP signature