On 03/16/2011 06:43 AM, xinyou yan wrote:
> Yes it is a function  defined in  the program.
> I will show  something like a shell.
> It wait  user to do what they want to . . What they can do , come from
> the function I define?
execlp(3) is a Linux library function that can be called only from an
executable program. The shells use this internally. The same
functionality is available from the Linux command line or from any shell:
foo arg1 arg2 .....

Normally in a C program you would fork(2) then exec. Effectively this
creates a subshell and executes the command in that shell.

You can use the bash exec function to redirect input and/or output.

-- 
Jerry Feldman <g...@blu.org>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

Reply via email to