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
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 03:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy