That is just like writing a script, not calling system calls
find is based on the nftw() call and uses stat semantics - it returns among other things a struct stat.
To answer your question--
You should consider system(). It calls execl for you and then calls waitpid.
The reason to call syscalls directly in C instead of using execl() is to eliminate process creation which has a lot of overhead that you have in a shell script. system() and execl() are doing nothing you cannot do in a shell script in this case.
open, creat, read, write, lseek and close
Are they all primitive?
:confused:
*Another Question: is there a different between a system call, and an i/o system call? (2 Replies)
Hi,
I'm new to UNIX system calls. Can someone share your knowledge as to how exactly system calls should be executed?
Can they be typed like commands such as mkdir on the terminal itself? Also, are there any websites which will show me an example of the output to expect when a system call like... (1 Reply)
Hello,
how would i be able to call ps in C programming?
thanks,
---------- Post updated at 01:39 AM ---------- Previous update was at 01:31 AM ----------
here's the complete system call, ps -o pid -p %d, getpit() (2 Replies)
Hi friends,
I have three questions.
1) What are system calls?
2) Is it necessary that system calls be in c language (in unix operating system)?
3) Importance of c language when programming in unix environment???
Looking forward to your wonderful replies!
... (2 Replies)
Hi friends,
I hope everyone is fine and doing well. I queried in my previous thread about the low-level qualities of C/C++ languages.I really thank you people for explaining, it was really helpful. One more ambiquity that I have in my mind is regarding the unix system calls like open, creat,... (1 Reply)
Discussion started by: gabam
1 Replies
LEARN ABOUT DEBIAN
install-menu
install-menu(1) Debian GNU/Linux manual install-menu(1)NAME
install-menu - Process a menu method and generate the menu files for a window manager or a menu-aware application.
DESCRIPTION update-menus(1) computes the list of menu entries and passes it in turn to the menu methods in /etc/menu-methods/. The task of a menu meth-
ods is to generate menus for a specific window manager. install-menu provides a generic and customizable way to do that. The documentation
of the install-menu definition language is available in the Debian Menu manual, a local copy being available in /usr/share/doc/menu/html.
SYNOPSIS
install-menu [-vh] [--remove] <menu-method>
Read menu entries from stdin in update-menus --stdout format and generate menu files using the specified menu-method.
Normally used in menu method scripts as #! /usr/bin/install-menu.
OPTIONS -h,--help
Show the help message and exit.
--remove
Remove the menu files instead of generating them.
-v,--verbose
Output messages about what the program is doing.
COPYING
install-menu is distributed under the term of the GNU General Public License version 2, or (at your option) any later version.
AUTHOR
Written by Joost Witteveen <joostje@debian.org>. Now maintained by Bill Allombert <ballombe@debian.org>.
SEE ALSO update-menus(1), menufile(5), /usr/share/doc/menu/html
Debian Project 28 November 2005 install-menu(1)