Sponsored Content
Top Forums Programming C program using IPC (inter process communication) Post 302265441 by localp on Sunday 7th of December 2008 01:54:47 PM
Old 12-07-2008
C program using IPC (inter process communication)

i want to write a C chat program that communicates over IPC(inter process communication), that could be run using 2 seperate terminal windows within the same computer. so that wat u type in one terminal window , should appear on the other and vice versa...

could some one please help me with the code, or any explanation .... i am new to C ...SmilieSmilieSmilieSmilieSmilie
 

10 More Discussions You Might Find Interesting

1. Programming

Inter Process Communication

unix IPC i would like to know the method of usage of semaphores on shared memory segments the topic seems very difficult to understand mainly when difrent proceses communicate instantly and how do i avaoid deadlock situation (2 Replies)
Discussion started by: kamathanil
2 Replies

2. Programming

Communication between a java and c++ program

Hi, I have the following problem. I have 2 programs, a java program and a c++ program. These 2 programs have to communicate with each other in full duplex mode. I want to use pipes for this communication. So when the c++ program pust something on the stdout the java program must be able to read... (4 Replies)
Discussion started by: lmnt22
4 Replies

3. HP-UX

Inter Process File Handling Problem

Hi All, i am running a oracle procedure which writes a file . The same file is picked up by another script which runs in a cron after every 5 minutes. Now the problem is that sometimes my script picks up a file while the procedure is still writing data in the file. is there is any way i... (4 Replies)
Discussion started by: saurabhjain
4 Replies

4. UNIX for Advanced & Expert Users

Inter-process communication:pipes,doors,etc.

Hi, I am thinking about writing a log daemon for a multi-processed ksh application (yes - I know that high-level language would be a better option). My question is as follows: If many processes (many scripts) will try writing to a single log file: print "message" > common.log Will it work or... (2 Replies)
Discussion started by: adderek
2 Replies

5. UNIX for Advanced & Expert Users

Possible to link an IPC Sempahore to a process ID?

Hi, Anyone knows whether it is possible to link/relate an IPC semaphore to a particular process ID? e.g. # ipcs -as IPC status from <running system> as of Wednesday July 2 14:10:39 EST 2008 T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS OTIME CTIME... (8 Replies)
Discussion started by: Solarius
8 Replies

6. Programming

help with write-read locks inter-process

I need help!Many Thanks! Now,I try to manage the shared memory inter-process . Inevitably,I have to deal with the synchronous. I know the pthread_rwlock in posix,and I compile ,then run successfully in Red Hat Enterprise 4. I have a doubt about whether the Posix supports the system such as... (1 Reply)
Discussion started by: weizh
1 Replies

7. OS X (Apple)

Inter-shell communication

If I open two bash shells and telnet from Shell 2 to a remote server (on the Net), is there a way to direct input from Shell 1 to the telnet shell? The telnet shell is a limited environment with a specific command set. I want to direct commands from Shell 1 and, if possible, put 1-second... (2 Replies)
Discussion started by: xinUoG
2 Replies

8. Programming

IPC - pipes between parent and child process

Hi guys, I'm having some problem here, I'm studying pipes, and i want to create a shell in C and at this point a don't want to use semaphores, instead I want to use tricks. Straight to the doubt: I've a parent and a child process, and both of them has some code to execute, and the child process... (5 Replies)
Discussion started by: pharaoh
5 Replies

9. Programming

please help a problem in client-server ipc message 2 pipes communication simple example

I want to have a message send & receive through 2 half-duplex pipes Flow of data top half pipe stdin--->parent(client) fd1--->pipe1-->child(server) fd1 bottom half pipe child(server) fd2---->pipe2--->parent(client) fd2--->stdout I need to have boundary structed message... (1 Reply)
Discussion started by: ouou
1 Replies

10. Shell Programming and Scripting

communication between shell and and a demon 'c' program

Hello, i have a demon 'c' program that have a dynamic table of logic registers ( 2000 variables ). exemple of registers: I1.34.5 M23.4.1 I want from shell acess to this table of registers. How can i do this? with something like for read I1.34.5: #cat... (3 Replies)
Discussion started by: rzyz
3 Replies
gnome-terminal(1)						   User Commands						 gnome-terminal(1)

NAME
gnome-terminal - terminal emulator for GNOME SYNOPSIS
gnome-terminal [--window-with-profile=profilename] [--tab-with-profile=profilename] [--command command] [--execute command] [--role=role] [--show-menubar | --hide-menubar] [--use-factory | --disable-factory] [--title=title] [--working-directory=dirname] [gnome-std-options] DESCRIPTION
gnome-terminal is the GNOME terminal emulation program. It provides access to the UNIX shell on the GNOME environment. gnome-terminal sup- ports multiple profiles to allow easy switching between preferences, and supports tabbing so that multiple terminals can be managed from a single window. By default, all GNOME terminals share a single process, reducing memory usage. This can be disabled by starting gnome-ter- minal with the --disable-factory option. OPTIONS
The following options are supported: --command commanExecutes the command command instead of the shell. This saves some memory if you just plan to run a dedicated application on that window. You can also use -e to specify this option. --execute commanThis option is provided for compatibility reasons. It is the same as the --command option. You can also use -x to specify this option. --disable-factorDo not register with the activation name server, and do not reuse an already running GNOME terminal process. --hide-menubar Hide the menubar. This applies only to one window. When used with multiple --window-with-profile options, it applies to the --window-with-profile option immediately to the left. Can be specified multiple times, once for each --window-with-profile option. --role=role The GNOME session manager follows the ICCCM convention of using the window title and the window role to identify specific windows. The session manager uses this information to put windows back in the same place when the user restarts their ses- sion. If all windows have a unique title, there is no need to set the role. However, as it is common for multiple GNOME terminals to have the same title, the user can also specify the role on the command line with the --role option. This helps the session manager to properly identify and restart each GNOME terminal (in the same location, and so on). When used with multiple --window-with-profile options, it applies to the --window-with-profile option immediately to the left. Can be specified multiple times, once for each --window-with-profile option. --show-menubar Show the menubar. This applies only to one window. When used with multiple --window-with-profile options, it applies to the --window-with-profile option immediately to the left. Can be specified multiple times, once for each --window-with-profile option. --tab-with-profiCreatesilanatab that uses the specified profile. This argument may be specified multiple times to create multiple tabs in a terminal. If this is used with multiple --window-with-profile options, the tab is created for the window that corresponds to the --window-with-profile option immediately to the left. --title=title Set the title for the GNOME terminal to be title. --use-factory Register with the activation name server, and reuse an already running GNOME terminal process. --window-with-prCreatesroaiGNOMEeterminal and a tab that uses the specified profile. This may be used with the --tab-with-profile option to create additional tabs. Multiple --window-with-profile options can be specified to create multiple GNOME terminal windows. All options specified after an --window-with-profile option apply to that --window-with-profile option only. --working-directSet=thenworking directory for the GNOME terminal to be dirname. gnome-std-optionStandard options available for use with most GNOME applications. See gnome-std-options(5) for more information. EXTENDED DESCRIPTION
gnome-terminal is designed to emulate the xterm program provided by the X Consortium. The xterm(1) program in turn is an almost-complete emulation of the DEC VT102 terminal. gnome-terminal supports the same extensions to the VT102 as those provided by the xterm program, through special escape sequences. The xterm program is an evolving program. Recent changes to xterm have been been incorporated into gnome- terminal. This includes emulation of the newer DEC VT220 escape sequences. EXAMPLES
Example 1: Running the `minicom' terminal emulator on the window example% gnome-terminal --command minicom Example 2: Monitoring the system example% gnome-terminal --command top Example 3: Starting two windows with different profiles example% gnome-terminal --window-with-profile=FirstProfile --tab-with-profile=SecondProfile --window-with-profile=SecondProfile In this example, the first window will have two tabs (FirstProfile and SecondProfile) and the second window will have one tab (SecondPro- file). ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables, set by gnome-terminal: TERM This variable is set to xterm by default. Some implementations of curses, and applications based on curses, may prefer the value to be xterm-color, color-xterm, or xterm-debian to support color. Users might need to change this setting to one of these values to enable color for such applications. COLORTERM This variable is set to xterm. Various applications (especially the Slang-based applications) use this setting to determine whether the terminal supports color. WINDOWID This variable contains the X11 Window identifier. This is sometimes used by applications to modify the contents of this window or provide special effects. EXIT STATUS
The following exit values are returned: 0 Application exited successfully >0 Application exited with failure FILES
The following files are used by this application: /usr/bin/gnome-terminal Executable for GNOME terminal emulator ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-terminal | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gnome-session(1), xterm(1), vte(1), libvte(3), gnome-std-options(5) Latest version of the GNOME Desktop User Guide for your platform. NOTES
Written by Michael Zucchi, Miguel de Icaza, Erik Troan. Updated by Brian Cameron, Sun Microsystems Inc., 2003, 2004. SunOS 5.10 31 Aug 2004 gnome-terminal(1)
All times are GMT -4. The time now is 01:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy