Sponsored Content
Top Forums Programming signal in process communication Post 23394 by Perderabo on Saturday 22nd of June 2002 11:02:29 AM
Old 06-22-2002
There are several "families" of signal system calls. This is a very confusing situation. sighold(), sigset(), and sigrelse() all originated on System 5 Release 3. They were also documented in the SVID (System V Interface Definition).

I don't have access to a freeBSD system, but I just reviewed the online docs for freeBSD. It has two signal families available: the Berkeley family, and the Posix family. You are going to need to switch families. And I suggest that you switch to the Posix family. It is especially important that you pick a family. Don't mix system calls from different families in the same program.

I saw FreeBSD man pages for the following Posix signal system calls:
sigaction()
sigsuspend()
sigaltstack() (you will rarely need to use this one)
sigpending()
sigprocmask()

These system calls are probably going to be found more often than the other families. They will work on Suns. If you start using these calls, you will maximize the portability of your code.
 

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

Problem with signals - 3 process communication

Hello, I would like to ask you for a little help with program I'm working on. I have problems with signals and synchronizing processes (I'm quite new to this part of programming). Process "parent" creates new child process "child1" and this process creates new child process "child2". The... (2 Replies)
Discussion started by: Nightwright
2 Replies

3. UNIX for Advanced & Expert Users

Getting status of a signal in process?

Hi all, How can a process be aware of the signals it handles. I looked at available signal API, but couldn't find any help. If a process defines it own handler for a signal, the default handler for that signal becomes overridden. I am interested in getting to know the... (2 Replies)
Discussion started by: bluehive
2 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. Programming

catching a signal from child process

i am creating children processes using fork system call every child i create goes to sleep for random time. when child stops running how can i catch his signal and turminate the child (2 Replies)
Discussion started by: emil2006
2 Replies

6. Programming

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... (2 Replies)
Discussion started by: localp
2 Replies

7. AIX

process caught signal 5

Hello, We are using AIX 5.2 ML 7. One of the process in its log file said the following and stopped running. Caught signal=5, exiting. What would cause the signal 5 to be generated on an AIX box. Please advise. Thx Jerardfjay (2 Replies)
Discussion started by: jerardfjay
2 Replies

8. Programming

C -- signal and background process

Hi all, Does a background process send a signal to its parent when completed? If so, how might i capture this signal? I'm trying to write shell in c so that when a background process finishes, it prints a message to the console. Thanks in advance for any advice. (1 Reply)
Discussion started by: jmelai
1 Replies

9. Emergency UNIX and Linux Support

signal between parent process and child process

Hello, everyone. Here's a program: pid_t pid = fork(); if (0 == pid) // child process { execvp ...; } I send a signal (such as SIGINT) to the parent process, the child process receive the signal as well as the parent process. However I don't want to child process to receive the... (7 Replies)
Discussion started by: jackliang
7 Replies

10. Programming

Application with communication between process

Hello I would like to create an application with communication between processes, application tightly coupled, have you please an idea about an API or a tool that allows me to generate such application? Thank you so much (11 Replies)
Discussion started by: chercheur857
11 Replies
KILLPG(3)						   BSD Library Functions Manual 						 KILLPG(3)

NAME
killpg -- send signal to a process group LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <signal.h> int killpg(pid_t pgrp, int sig); DESCRIPTION
killpg() sends the signal sig to the process group pgrp. See sigaction(2) for a list of signals. If pgrp is 0, killpg() sends the signal to the sending process's process group. The sending process and members of the process group must have the same effective user ID, or the sender must be the super-user. As a single special case the continue signal SIGCONT may be sent to any process that is a descendant of the current process. RETURN VALUES
Upon successful completion, a value of 0 is returned. Otherwise, a value of -1 is returned and the global variable errno is set to indicate the error. ERRORS
killpg() will fail and no signal will be sent if: [EINVAL] sig is not a valid signal number. [ESRCH] No process can be found in the process group specified by pgrp. [ESRCH] The process group was given as 0 but the sending process does not have a process group. [EPERM] The sending process is not the super-user and one or more of the target processes has an effective user ID different from that of the sending process. SEE ALSO
getpgrp(2), kill(2), sigaction(2) HISTORY
The killpg() function call appeared in 4.0BSD. BSD
June 2, 1993 BSD
All times are GMT -4. The time now is 06:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy