ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Its my first question and mail on this forum .
Actually i m developing an application in which , when application runs , it forks 4 childs, i want to display a new terminal for each child process and execute a program using execl(), pleas tell me how can i execute a terminal(bash) from my application
I'm not exactly sure what you're trying to do here. If you want to just start bash from a program than you can use one of the exec() family of functions to run /bin/bash.
However, if you're trying to open a new terminal window under X then you'd use one of the exec() family of functions to call your terminal application (i.e. xterm, konsole, etc.)
If you just want to run 4 different commands then opening a new shell (bash) is quite unnecessary. But if you want to open 4 new terminal windows and then have 1 command run in each then you can use popen() to run xterm/konsole/whatever and then send your command to the pointer that popen() returned. Something like this:
for(i = 0;i < 4;+=i)
term = popen("/usr/X11R6/bin/xterm", "w");
I think that would work anyway. I don't have access to a linux box at the moment
If I didn't answer your question just leave some more detail on what you're trying to accomplish.
Hi ! Actually i have not worked much in Linux,
we have used linuc GUI , and developed our application in C .
Now i want to run each process in different trminal , bcaz when i runall processes in one terminal , time is not given to all processes concurretly ,and one can se that which process is executing at this time and all other processes running in that terminal remains idle, so thats why i want torun each process in different terminal ,
just tyell methat how can i execute a new terminal from y program and run a seperate process in it