Re: [Nautilus-list] Another question: nautilus and XALF



Yoann Vandoorselaere wrote:

On Sat, 2002-01-26 at 12:35, Rémi Cohen-Scali wrote:

I got the trick !

The icon activation code is in fm-directory-view.c:activate_callback.
Xalf is not launched because the eel_gnome_shell_execute is called instead of nautilus_launch_application_from_command (the first does not handle xalf, the former does). This code uses fork/exec to launch appl. nautilus_launch_application_from_command uses system.
I don't know why fork/exec had to be used. Does it matter ?


Well, you have to use fork() because the context in which the program
execute will be replaced by the executed program context. So unless you
want your program to exit when the executed program exit, you have to
fork() (by the way using vfork() if supported would probably bring some
performance improvment on operating system that doesn't support copy on
write... if that still exist :) ).

Yes. ok for the way fork/exec act. But what is the diff with system(3) (which use exec(3)) ?
nautilus_launch_application_from_command uses system(3).
Would it be using eel_gnome_shell_execute ?
Is it a reason why activate_callback cannot call nautilus_launch_application_from_command ?
What about the second patch I just post ?

--
                                                         -o)
                  Remi Cohen-Scali                       /\\
<Remi Cohen-Scali com>          <rcoscali rcsnet net>    _\_v
                                                        ----


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]