LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-06-2005, 12:21 PM   #1
manjiri
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Rep: Reputation: 0
modifying system calls


i just wanted to know can we make some change in system call used to open a file. i.e how it searches for contents of file. i.e when we try to open a file in any editor what actions are actually taken.
 
Old 11-06-2005, 12:53 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
well when you open a file you just give it argument of file path name in the form of a character string and a flag for truncate, append, create. returned you get a file descripter and you can do anything you like with it. File descripters remember their place in the file but there is a call lseek you can use to jump around to positions off_t offset from the beginning if you like.

you mention editor.
editors can use a variety of wrapped methods like from a toolkit or something to access a file or can use syscalls directly.
 
Old 11-07-2005, 10:12 AM   #3
manjiri
LQ Newbie
 
Registered: Nov 2005
Posts: 8

Original Poster
Rep: Reputation: 0
thanx can u pl tell me which files are actually loaded when i type vi on the command prompt
 
Old 11-07-2005, 01:02 PM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
Quote:
Originally posted by manjiri
thanx can u pl tell me which files are actually loaded when i type vi on the command prompt
that would be the executable file vi
most likely /usr/bin/vi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell example using system calls djgerbavore Programming 7 03-06-2010 02:39 AM
Making system calls in C++ harisund Programming 4 11-26-2005 05:58 PM
New to C++. I need to learn system calls matazar42 Programming 7 05-01-2005 09:34 PM
Some system calls Spooky Programming 1 11-24-2004 10:17 AM
system calls in Java AMMullan Programming 2 04-14-2004 01:48 AM


All times are GMT -5. The time now is 12:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration