calling another program alongwith arguments using execl not working
Been at the problem for 2 long with no solution.Problem description : I have a core program written in GNU C having arguments where wild characters(-f file.*) is passed; the program uses getopt option to assess the arguments. This program is required to be called by a front end graphic interface built using libglade. I tried using execl and it's variants ; I have gone thru relevent man pages ; passing arguments and calling the program works with all other arguments except the ones where wild characters are used; Pl help :Pengy:
Re: calling another program alongwith arguments using execl not working
Use system() instead of one of the exec..()-functions. System() does run the program inside a shell.
If you cannot use system(), because its functionality is too limited for you purpose, check out these functions (ordered from most sophisticated, to most basic):
man 3 wordexp
man 3 glob
man 3 scandir + man 3 fnmatch
man 3 opendir + man 3 readdir + man 3 fnmatch
Hope this helps.
|All times are GMT -5. The time now is 05:35 AM.|