Questions tagged [sigqueue]

A POSIX function to queue a signal to process

A POSIX function to queue a signal to process: http://pubs.opengroup.org/onlinepubs/9699919799/functions/sigqueue.html

14 questions
12
votes
2 answers

Is the data in siginfo trustworthy?

I've found that on Linux, by making my own call to the rt_sigqueue syscall, I can put whatever I like in the si_uid and si_pid fields and the call succeeds and happily delivers the incorrect values. Naturally the uid restrictions on sending signals…
R.. GitHub STOP HELPING ICE
  • 208,859
  • 35
  • 376
  • 711
8
votes
1 answer

How do I receive a signal sent with sigqueue in a c program (on linux)?

How do I receive receive a signal sent with sigqueue in a c program (on linux)? If just use kill to send a signal I just add a receiver with something like this signal(SIGUSR1, sigusr1); that point to a simple function like this: void sigusr1()…
Johan
  • 20,067
  • 28
  • 92
  • 110
6
votes
1 answer

How do I receive data sent by sigqueue() syscall

I have 2 process sigserver and sigclient. sigserver waits for a signal to come and sigclient sends data (int+char) to sigserver. sigserver.c void sighand(int signo, siginfo_t *info, void *extra) { void *ptr_val = info->si_value.sival_ptr; …
JohnG
  • 807
  • 1
  • 12
  • 20
2
votes
2 answers

How do I send and receive real-time signals `sigqueue()` in Python?

Python provides a signals module and os.kill; does it have a facility for sigqueue() (real-time signals with attached data)? What are the alternatives?
joeforker
  • 40,459
  • 37
  • 151
  • 246
1
vote
1 answer

Sending data from parent to child through sigqueue

int sigqueue(pid_t pid, int sig, const union sigval value); union sigval { int sival_int; void *sival_ptr; }; The parent decides to use memory from its heap and sends the shallow copy of data (sending address of data through sival_ptr) to…
1
vote
0 answers

Is there any way to use sigqueue on OS X?

I 've recently noticed that sigqueue doesn't work on OS X (mac OS Sierra), i 'd like to know if there is way without using a virtual machine (linux)
jorge saraiva
  • 235
  • 4
  • 15
1
vote
1 answer

sigqueue() to send a signal to process group

I create process tree with fork() (about 3 child). I can easly send a signal to all of them by kill(-getpgrp(), signal_number), but how to do the same with sigqueue? The sigqueue() function sends a signal to a process or a group of processes, they…
Baal
  • 77
  • 8
1
vote
2 answers

Can't build sigqueue example with gcc but g++ is ok?

I have a strange build problem. I have a simple test program that sends a sigqueue to another process. This little code example builds and runs when I build it as a c++ program (compiled with g++) but when I compile it as a c program (with gcc) I…
Johan
  • 20,067
  • 28
  • 92
  • 110
1
vote
1 answer

Can I send char* with sigqueue to another process

Here is a part of my code in client program union sigval toServer; char *test = "dummy"; serverPID = atol(buf2); toServer.sival_ptr = (void *)test; // Register to server if (sigqueue(serverPID,…
noname
  • 261
  • 1
  • 4
  • 11
0
votes
1 answer

Ignoring signal if it's sent too quickly

I have the following code: //includes... #define SIG_INT 0 //prints out when SIG_INT is received from siginfo_t* void handler(int, siginfo_t*, void*); int main() { pid_t ambulance1 = 0; pid_t ambulance2 = 0; struct sigaction…
vapandris
  • 27
  • 5
0
votes
0 answers

Parent won't receive signal with sigqueue call - C

I am trying to send a signal from a child process to a parent process in C, and I've got a signal handler setup: void handler(int signumber,siginfo_t* info,void* nonused) { printf("Signal with number %i has arrived\n",signumber); switch…
Toni Nagy
  • 133
  • 2
  • 11
0
votes
1 answer

C - Valgrind reporting "Syscall param points to uninitialised byte" when sigqueue call

Got a program where child processes need to send father some signals. Yet, valgrind yells at sigqueue call. Been reading for a time now but I couldn't find an answer. Here's what child process do: void cajero(int id){ FILE *fp, *fp_caja; …
0
votes
1 answer

Can signals be pushed from and to self process and then handled as event on EPOLL?

I have to design a real time system which process data received from multiple process on posix mqueue (Proprietary Implementation). The primary requirement is to not change the overall system main loop delay but to handle things on events. I do not…
0
votes
1 answer

Send child pid using sigqueue and SIGUSR1 to father

I am trying to send a child's pid to his father using SIGUSR1 and sigqueue. But the signal is never sent, or it appears not to be sent. #include #include #include #include #include void…
Tanatos Daniel
  • 558
  • 2
  • 9
  • 27