Sponsored Content
Top Forums Programming kill() function problem in client-server ipc message using 2 FIFOs Post 302529832 by ouou on Friday 10th of June 2011 03:30:23 PM
Old 06-10-2011
Thanks for your continue help.

I tried this before, just leave the kill (getppid(),SIGTERM) there,it can't terminate the program. in my main(), I put waitpid(childpid,NULL,0);

please help


elseif(strcasecmp ("Exit", mesg.mesg_data)==0){
// kill(getpid(),SIGTERM); // getpid() gets your OWN pid!
kill(getppid(),SIGTERM); // After you're dead, you can't kill anything else.
exit(0);
}

Last edited by ouou; 06-11-2011 at 01:36 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

Praying for help: FIFOs, IPC

omg i need help so bad. I've been working on a school project for what seems like an eternity and i'm close to deadline. Using FIFO's (i ahve to) to communicate between parent and child proc's. Right now I'm stuck on a read/write. fifomsg is a struct with int length and char message fields. ... (5 Replies)
Discussion started by: Funktar
5 Replies

2. Programming

forks, ipc, fifos, update issues...

Hi, so I've got this program("main") that fork executes another ("user"). These programs communicate through fifos. One communication is a spawn call, where user passes an executable, main forks and executes it. So, I'm keeping track of all my processes using a task table. After the fork (for... (6 Replies)
Discussion started by: Funktar
6 Replies

3. HP-UX

posix ipc message queue

Hello, My question is related to "pipcs -qa" command under HP-UX 11i PA-RISC 64 bits. We have a little C program that creates posix ipc message queues using the mq_open() system function. The program fail with 'No space left on device' error when we create big queues. What is the system... (6 Replies)
Discussion started by: cadanir
6 Replies

4. Cybersecurity

client-server message transfer

using fork().how do v send and receive messages in child and parent process. (2 Replies)
Discussion started by: krishnavel
2 Replies

5. UNIX for Dummies Questions & Answers

socket programming : client server IPC

I'm new to socket programming. Have a basic doubt. I have a structure(global) at the server side. I have two different client connecting to the server. Will the changes made by one client on the structure be visible to the other client when it accesses the same client? I'm creating a STREAM... (3 Replies)
Discussion started by: abc.working
3 Replies

6. Programming

Server - Client application problem

hi all I'm beginner in CORBA Server-Client appliction development. My server- client application was worked well and i have tested it too. Due to some Network problem we have rebooted our dedicated server , then i restart my corba service, application in the server it started... (0 Replies)
Discussion started by: VijayakumarN
0 Replies

7. SuSE

SLES - 10 -DFLT_MSGMAX - Message queues in /usr/src/linux/ipc/mqueue.c

Folks, Does anyone know the magic to balancing out the: DFLT_MSGMAX and the DFLT_MSGSIZEMAX values? Is there some magical formula... We have a home grown program that is choking we think because of these values (the 10 and the 8192 defaults) Thanks, thomas B. #define... (0 Replies)
Discussion started by: lacakid
0 Replies

8. Programming

Client/Server Socket Application - Preventing Client from quitting on server crash

Problem - Linux Client/Server Socket Application: Preventing Client from quitting on server crash Hi, I am writing a Linux socket Server and Client using TCP protocol on Ubuntu 9.04 x64. I am having problem trying to implement a scenario where the client should keep running even when the... (2 Replies)
Discussion started by: varun.nagpaal
2 Replies

9. UNIX for Dummies Questions & Answers

IPC Message Queue. msgrcv doesnt work..

Hi everybody, this is the situation. there is a programm XYZ which opens a message queue with the key 47110815 and waits for a SIGUSR1. After receiving this signal it sends a message with type 100 and a number (as ASCII) in the message-body. I have to write a prog which frist sends the... (1 Reply)
Discussion started by: daredevil82m
1 Replies

10. 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
XRaiseWindow(3X11)						     MIT X11R4							XRaiseWindow(3X11)

Name
       XRaiseWindow, XLowerWindow, XCirculateSubwindows, XCirculateSubwindowsUp, XCirculateSubwindowsDown, XRestackWindows - change window stack-
       ing order

Syntax
       XRaiseWindow(display, w)
	  Display *display;
	  Window w;

       XLowerWindow(display, w)
	  Display *display;
	  Window w;

       XCirculateSubwindows(display, w, direction)
	  Display *display;
	  Window w;
	  int direction;

       XCirculateSubwindowsUp(display, w)
	  Display *display;
	  Window w;

       XCirculateSubwindowsDown(display, w)
	  Display *display;
	  Window w;

       XRestackWindows(display, windows, nwindows);
	  Display *display;
	  Window windows[];
	  int nwindows;

Arguments
       direction Specifies the direction (up or down) that you want to circulate the window.  You can pass or

       display	 Specifies the connection to the X server.

       nwindows  Specifies the number of windows to be restacked.

       w	 Specifies the window.

       windows	 Specifies an array containing the windows to be restacked.

Description
       The function raises the specified window to the top of the stack so that no sibling window obscures it.	If the windows are regarded as
       overlapping sheets of paper stacked on a desk, then raising a window is analogous to moving the sheet to the top of the stack but leaving
       its x and y location on the desk constant.  Raising a mapped window may generate events for the window and any mapped subwindows that were
       formerly obscured.

       If the override-redirect attribute of the window is and some other client has selected on the parent, the X server generates a event, and
       no processing is performed.  Otherwise, the window is raised.

       can generate a error.

       The function lowers the specified window to the bottom of the stack so that it does not obscure any sibling windows.  If the windows are
       regarded as overlapping sheets of paper stacked on a desk, then lowering a window is analogous to moving the sheet to the bottom of the
       stack but leaving its x and y location on the desk constant.  Lowering a mapped window will generate events on any windows it formerly
       obscured.

       If the override-redirect attribute of the window is and some other client has selected on the parent, the X server generates a event, and
       no processing is performed.  Otherwise, the window is lowered to the bottom of the stack.

       can generate a error.

       The function circulates children of the specified window in the specified direction.  If you specify raises the lowest mapped child (if
       any) that is occluded by another child to the top of the stack.	If you specify lowers the highest mapped child (if any) that occludes
       another child to the bottom of the stack.  Exposure processing is then performed on formerly obscured windows.  If some other client has
       selected on the window, the X server generates a event, and no further processing is performed.	If a child is actually restacked, the X
       server generates a event.

       can generate and errors.

       The function raises the lowest mapped child of the specified window that is partially or completely occluded by another child.  Completely
       unobscured children are not affected.  This is a convenience function equivalent to with specified.

       can generate a error.

       The function lowers the highest mapped child of the specified window that partially or completely occludes another child.  Completely unob-
       scured children are not affected.  This is a convenience function equivalent to with specified.

       can generate a error.

       The function restacks the windows in the order specified, from top to bottom.  The stacking order of the first window in the windows array
       is unaffected, but the other windows in the array are stacked underneath the first window, in the order of the array.  The stacking order
       of the other windows is not affected.  For each window in the window array that is not a child of the specified window, a error results.

       If the override-redirect attribute of a window is and some other client has selected on the parent, the X server generates events for each
       window whose override-redirect flag is not set, and no further processing is performed.	Otherwise, the windows will be restacked in top to
       bottom order.

       can generate error.

Diagnostics
       Some numeric value falls outside the range of values accepted by the request.
		 Unless a specific range is specified for an argument, the full range defined by the argument's type is accepted. Any argument
		 defined as a set of alternatives can generate this error.

       A value for a Window argument does not name a defined Window.

See Also
       XChangeWindowAttributes(3X11), XConfigureWindow(3X11), XCreateWindow(3X11), XDestroyWindow(3X11), XMapWindow(3X11), XUnmapWindow(3X11)
       X Window System: The Complete Reference, Second Edition, Robert W. Scheifler and James Gettys

																XRaiseWindow(3X11)
All times are GMT -4. The time now is 01:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy