LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 04-11-2011, 09:02 PM   #1
udaraliyanage
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
Multiple commandlines accessing same instance of a program


I want to write a program that same instance of it can be accesed by multiple comandlines. What kind of a program it should be and how to write it?
 
Old 04-13-2011, 03:37 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 116Reputation: 116
You have to be more clear.

Any executable binary can be run as many times as you like by as many command line consoles as there are.
 
1 members found this post helpful.
Old 04-13-2011, 04:42 AM   #3
udaraliyanage
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Multiple command line

yes , we can write multiple instances of a binary program using multple commandlines.
i want to run same instance of the program using multiple commandlines
 
Old 04-13-2011, 11:57 AM   #4
bluebox
Member
 
Registered: Jun 2004
Posts: 71

Rep: Reputation: 9
"commandline" usually refers to a shell. And a shell is meant to run programs, not to access running programs. So, when using a shell, you'll have to use some kind of client-server architecture, similar to a ftp client, that accesses a ftp server.

"Sockets" are the basic level of interprocess-communication:
http://www.linuxhowtos.org/C_C++/socket.htm

There are higher levels of message buses, like "dbus".

A very low level of communication would be using the filesystem and file-content. Commands as simple as "echo" and "cat" could be enough to access your program.

A different approach would be to simply let your program open multiple windows/terminals. This depends on your needs.
 
1 members found this post helpful.
Old 04-13-2011, 12:09 PM   #5
udaraliyanage
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Multiple commandline

I think I got the right answer. thank you very much @bluebox
 
  


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
restricting multiple instance of a program V_Ganesh Programming 14 01-23-2008 10:42 AM
HI ,I walt to know how to run multiple instance sathish80 Linux - Newbie 3 01-18-2007 01:12 PM
Multiple Sound Instance Problems sadarax Linux - Hardware 4 12-27-2006 11:35 AM
Dansguardian and squid - multiple instance jasboy Linux - Software 9 08-30-2006 01:36 PM
multiple instance of X satinet Linux - General 3 03-10-2005 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:42 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