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
FAXQUIT(8C)															       FAXQUIT(8C)

NAME
faxquit - tell a HylaFAX server to terminate SYNOPSIS
/usr/sbin/faxquit [ -q queue-dir ] [ modem ] DESCRIPTION
faxquit sends a message to a HylaFAX server process telling it to quit operation. If modem is specified, the faxgetty(8C) process servicing the specified modem is notified. modem can either be the name (typically the last component of the terminal port the modem is attached to), or the full name of the associated FIFO named pipe file, e.g. ``FIFO.ttym2''. If no modem is specified, faxquit will send the request to the ``FIFO'' named pipe file causing the HylaFAX queue manager process to termi- nate. Note that server processes may not terminate immediately. In particular the faxq process will not exit until any active jobs are com- pleted; this is necessary for proper operation (faxq must wait for child processes to terminate so that it can collect their exit status and update the state of the jobs being operated on). OPTIONS
-q dir Use a spooling area other than /var/spool/fax. FILES
/var/spool/fax default spooling area /var/spool/fax/FIFO fifo for contacting faxq Consult hylafax-server(5F) for a complete discussion of the structure and content of the spooling area. SEE ALSO
hylafax-server(5F), faxq(8C), faxgetty(8C) October 3, 1995 FAXQUIT(8C)
All times are GMT -4. The time now is 02:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy