LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-07-2003, 07:21 AM   #1
anon342
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Rep: Reputation: 0
creating/running process...


hi guys..
i have a vrey big problem. i'm workking on a project in kylix 3-the C++ part, not the delphi one.
my problem is that i dont't know how and i didn't find any answer on the net to HOW DO I RUN AN EXTERNAL PROGRAM,BASH SCRIPT ETC....
for exaple i would like to use some shell commands and programs like cdrecord ... the system/exec family shit don't work (

so please, if any one knows how tell, cos i'm desperate..


----------------
thanx
 
Old 12-07-2003, 07:37 AM   #2
Tarts
Member
 
Registered: Feb 2003
Distribution: Slackware 9.1 (exclusively) ;)
Posts: 344

Rep: Reputation: 30
Re: creating/running process...

Quote:
Originally posted by gmasterleo2000
hi guys..
i have a vrey big problem. i'm workking on a project in kylix 3-the C++ part, not the delphi one.
my problem is that i dont't know how and i didn't find any answer on the net to HOW DO I RUN AN EXTERNAL PROGRAM,BASH SCRIPT ETC....
for exaple i would like to use some shell commands and programs like cdrecord ... the system/exec family shit don't work (

so please, if any one knows how tell, cos i'm desperate..


----------------
thanx
Code:
execl("/Scripts/fmf.sh", "fmf.sh", NULL);
This works for me, is the script your using executable?

Tarts
 
Old 12-07-2003, 09:35 AM   #3
anon342
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
hey man.. ur sollution is good but not woking well. why? let me tell you:
i did like u told me and the script runs somewhere there in the back, but immediately a debug window(CPU registers) appears in the front and the whole program of mine does not do anything further.
much more if i do a fork() and put the exec line in the child... DOES not execute anymore..

to help anyone to help me.. i want sth like, let's say: "ls -l|wc > lines.txt".. i mean i want to execute a commands using pipes and redirections..

pls help meeeeeeeeeee.. how am i going to finish my winter term project ?(
 
Old 12-07-2003, 11:23 AM   #4
Tarts
Member
 
Registered: Feb 2003
Distribution: Slackware 9.1 (exclusively) ;)
Posts: 344

Rep: Reputation: 30
Quote:
Originally posted by gmasterleo2000
hey man.. ur sollution is good but not woking well. why? let me tell you:
i did like u told me and the script runs somewhere there in the back, but immediately a debug window(CPU registers) appears in the front and the whole program of mine does not do anything further.
much more if i do a fork() and put the exec line in the child... DOES not execute anymore..

to help anyone to help me.. i want sth like, let's say: "ls -l|wc > lines.txt".. i mean i want to execute a commands using pipes and redirections..

pls help meeeeeeeeeee.. how am i going to finish my winter term project ?(
I cant do your homework for you, however, I will give you a hint...look in to '/bin/bash -c'.

Tarts
 
Old 12-07-2003, 12:37 PM   #5
anon342
LQ Newbie
 
Registered: Dec 2003
Posts: 4

Original Poster
Rep: Reputation: 0
nope.. still couldn't solve the problem.
to make the situation clearest.. i'm on form. i have a button here and when i press it i want to do thing i described above(executing a command/program, also being possible do execute piped/redirected commands).

my project(homework) is to make a nice interface(a frontend actually) for cdrecord and implement fuctions and interface like Nero Burning Rom. if you think that helping me to overcome executing something is doing my homework...

seems like my teacher will be glad to tell me that i will need to repeat this year for not passing at his subject

anyway. thank you for at least answering to my initial post and having patieence to read my text.
anyway.. seeems like i'm all on my own.
 
  


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
Getting PID of running process in C/C++ laikos Programming 16 10-30-2015 06:16 PM
Creating a custom process id cbutcher Linux - General 2 04-29-2005 06:59 AM
Running process sonu1082 Linux - Software 2 11-25-2004 05:32 AM
Process not running LinuxRam Linux - Newbie 4 09-09-2004 12:45 AM
Creating New Linux Distribution Process liguorir Linux - Software 2 11-10-2003 11:20 AM

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

All times are GMT -5. The time now is 11:27 AM.

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