LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-08-2004, 06:03 AM   #1
pantera
Member
 
Registered: May 2004
Posts: 80

Rep: Reputation: 15
c question


how to send a name of file as argument to another program so that i can open the file from another program
example

program1
load program2 with filename f1

program2
open file with filename f1 sent by program1

thanx
 
Old 08-08-2004, 06:33 AM   #2
max_sipos
Member
 
Registered: Jul 2004
Posts: 96

Rep: Reputation: 15
Simple way is to use system(const char*) which executes a shell command. You just pass the file as an argument. There may be security problems with this though. Other thing that comes to mind is using fork then exec ...
 
Old 08-08-2004, 09:25 PM   #4
james.zhang
LQ Newbie
 
Registered: Feb 2004
Location: China Hunan
Posts: 9

Rep: Reputation: 0
execl, execv, execle, execlp and execvp
I think all the commands above can help you.
 
  


Reply



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
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 04:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 01:51 PM
2 part question: Speeding up MDK9.1/GNOME question wardialer Linux - Newbie 6 10-14-2004 03:16 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 02:02 PM
RE: Suse 8.0 hardware question {newbie question, pls help} Radiouk Linux - Distributions 2 06-04-2002 12:53 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:51 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration