LinuxQuestions.org
Visit Jeremy's Blog.
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, 10: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, 04:37 AM   #2
zordrak
Member
 
Registered: Feb 2008
Distribution: Slackware
Posts: 595

Rep: Reputation: 115Reputation: 115
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, 05: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, 12:57 PM   #4
bluebox
Member
 
Registered: Jun 2004
Posts: 71

Rep: Reputation: 6
"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, 01: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


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


All times are GMT -5. The time now is 08:02 AM.

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