Sponsored Content
Top Forums Programming do you believe X-application will "kill" the CDE and come back to login dialog Post 24745 by Perderabo on Wednesday 17th of July 2002 09:22:48 AM
Old 07-17-2002
Please read our rules. We don't allow posters to request email responses.

I don't use CDE. But if your program is getting a SIGHUP, there is a way to find out why. You can use sigaction() to install a signal handler. A signal handler installed by sigaction will be called with a pointer to a siginfo structure. The handler can examine the values in the structure to figure out why the signal arrived. Of particular interest are si_pid (sending process ID) and si_uid (sending user ID). The handler could log this info. It could even run "ps" for the pid in question and log that. Then after it exits, you will know exactly why.

And a process can always call getpgrp() to get its own process group id. And it can call getsid() to get the process group id of its session leader.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. UNIX for Dummies Questions & Answers

HoHow to compile Linux dialog - "curses.h" missing ?

Hi, I tried native compile Linux dialog for Linux embedded device and got "curses.h" error message. As Linux dialog is already compiled and working as Debian .deb package (installed it). What is a way to import curses.h from other package sources to work for dialog sources compilation in my... (2 Replies)
Discussion started by: darius2
2 Replies

4. UNIX for Dummies Questions & Answers

how to install "source" command!/ broken "login.cl"!

Hello, I am new to this forums and this is my first "asking help" message! i have 2 problems: 1- for unknown reasons the "source" command is not avalable in my system (UBUNTU). i can't either see it in my bin directory! 2- again for unknown reasons the "login.cl" file in the home... (0 Replies)
Discussion started by: astrosona
0 Replies

5. Shell Programming and Scripting

Help on using "dialog" in shell

hello, i'm experimenting on "dialog" in shell scripting consider an example : dialog --passwordbox "password" 10 30 i need to take the password typed to a variable. how can i do it. i tried it in perl by backticking the command. but its not working. give me a solution ASAP......:) (2 Replies)
Discussion started by: sunjujohn
2 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
SIGQUEUE(2)						     Linux Programmer's Manual						       SIGQUEUE(2)

NAME
sigqueue, rt_sigqueueinfo - queue a signal and data to a process SYNOPSIS
#include <signal.h> int sigqueue(pid_t pid, int sig, const union sigval value); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): sigqueue(): _POSIX_C_SOURCE >= 199309L DESCRIPTION
sigqueue() sends the signal specified in sig to the process whose PID is given in pid. The permissions required to send a signal are the same as for kill(2). As with kill(2), the null signal (0) can be used to check if a process with a given PID exists. The value argument is used to specify an accompanying item of data (either an integer or a pointer value) to be sent with the signal, and has the following type: union sigval { int sival_int; void *sival_ptr; }; If the receiving process has installed a handler for this signal using the SA_SIGINFO flag to sigaction(2), then it can obtain this data via the si_value field of the siginfo_t structure passed as the second argument to the handler. Furthermore, the si_code field of that structure will be set to SI_QUEUE. RETURN VALUE
On success, sigqueue() returns 0, indicating that the signal was successfully queued to the receiving process. Otherwise -1 is returned and errno is set to indicate the error. ERRORS
EAGAIN The limit of signals which may be queued has been reached. (See signal(7) for further information.) EINVAL sig was invalid. EPERM The process does not have permission to send the signal to the receiving process. For the required permissions, see kill(2). ESRCH No process has a PID matching pid. VERSIONS
This system call first appeared in Linux 2.2. CONFORMING TO
POSIX.1-2001. NOTES
If this function results in the sending of a signal to the process that invoked it, and that signal was not blocked by the calling thread, and no other threads were willing to handle this signal (either by having it unblocked, or by waiting for it using sigwait(3)), then at least some signal must be delivered to this thread before this function returns. On Linux, the underlying system call is actually named rt_sigqueueinfo(), and differs in its third argument, which is the siginfo_t struc- ture that will be supplied to the receiving process's signal handler or returned by the receiving process's sigtimedwait(2) call. Inside the glibc sigqueue() wrapper, this argument, info, is initialized as follows: info.si_signo = sig; /* argument supplied to sigqueue() */ info.si_code = SI_QUEUE; info.si_pid = getpid(); /* Process ID of sender */ info.si_uid = getuid(); /* Real UID of sender */ info.si_value = val; /* argument supplied to sigqueue() */ SEE ALSO
kill(2), sigaction(2), signal(2), sigwait(3), signal(7) COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2007-07-26 SIGQUEUE(2)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy