On Wed, Sep 25, 2002 at 03:45:23PM +0200, cana rich wrote: > I have a RedHat 7.2 and i am making a C program which launch an > other program. Can somebody tell me what command i have to use? (for > exemple in windows, i would use "Winexec(path_to_program,0);"
Essentially, under Unix--er, Linux--you first 'fork', which duplicates the current process, then use some form of the 'exec' function to over-write the new process with the desired program in memory. There are several methods to do this. Look up 'system(3)' for the simplest library-level method. It carries out all the work of fork/exec, with reasonable default behavior. For more control over how the process is carried out--of course, with more complicated invocation--look up 'fork(2)', 'exec(3)', and 'execve(2)'. There are also threads in Linux, but that's not what you asked for. TO LOOK UP FUNCTION DOCUMENTATION: The number following the function indicates the "section" of the manpages in which the documentation resides; it's a legacy of the printed manual page sets from the Unix system, and is accepted by the 'man' command to disambiguate when there are multiple entries with the same name, e.g., there is an 'exec' builtin function in 'bash' in Section 1, but there is also an entry 'exec' that describes all the various flavors of 'exec' in Section 2. If you just did 'man exec', all you'd see would be the first entry. Cheers, -- Dave Ihnat [EMAIL PROTECTED] -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list