You are not logged in.
Pages: 1
Ok I am starting to program in C and I would like to make useful apps
but I don't know how to call other programs within linux from C
I'm looking for guides that help on linux "C" programming.
I've tried some guides I googled but I tried their examples and don't get anything
they appear obsolete (1996 or 1999)
Guide I found
Any sugestions?
Thanks
Offline
Offline
Offline
One thing that's cool is that most system routines have man pages. When you're reading your book and the author is not clear about a detail of how some function works, you can look it up with man.
To call another program, you might want to look at "exec" and friends (man execl) and fork (man fork). But I am also a newbie here.
Offline
Note that calling other programs is not a common occurrence for C programs...nor is that a "system call". A system call is calling a kernel-provided function such as stat or access, not calling another user-space program on the system.
Offline
For most programs, using posix calls would make more sense than linux system calls --- your program would be more portable. Just something to keep in mind
Offline
Note that calling other programs is not a common occurrence for C programs...nor is that a "system call". A system call is calling a kernel-provided function such as stat or access, not calling another user-space program on the system.
U call other programs with a system call, u can open a file and do operations on it with system calls too.
What he want is a GUI like gtk or a framework
Are u listening?
Offline
Note that calling other programs is not a common occurrence for C programs...
Yes, it sounds like OP is misapplying C somewhat. A scripting language is a better choice if you're trying to do scripting.
Offline
Pages: 1