Sponsored Content
Full Discussion: Signals in Unix Solaris
Top Forums Programming Signals in Unix Solaris Post 18118 by heljy on Sunday 24th of March 2002 07:58:50 PM
Old 03-24-2002
Signals in Unix Solaris

I am doing a project to stimulate the scheduing policy of an OS under Unix Solaris.

Its something like that:

A process, say A will communicate to another process, which is the OS, and then execute the system call, pause();

The stimulated OS will then have to use sigsend(); to send a SIGCONT signal to wake process A up. And OS can also use sigsend() to send a SIGSTOP signal to suspend process A.

Now, my problem is that I cant get SIGCONT to work. Whenever I do a SIGSTOP, the process gets suspended and moved to the background. So even after SIGCONT, that process does not continue on the shell where it got started (console).

SIGCONT also does not wake the process up when I first called it. pause() should block a process until it gets a signal (in this case SIGCONT).

Am I using SIGCONT correctly? If not how should I use it?

Thanks in advance.
 

10 More Discussions You Might Find Interesting

1. Programming

Signals In HP-UX

does the way of handling, interrupting signals in HP-UX same as that of solaris. If there is difference than what it is.?:confused: (1 Reply)
Discussion started by: kapilv
1 Replies

2. Programming

Unix/Linux Newbie(ish) Question - IPC/Signals

:) Hello, i have been given the following code to help me learn how to use signals, it won't compile. The problem maybe because this was written for use in Unix and i am trying to compile in Linux. The error i get says that SIGPIPE and SIG_IGN are undeclared. I think that these are defined... (2 Replies)
Discussion started by: theultimatechuf
2 Replies

3. UNIX for Advanced & Expert Users

Signals in Shell

Using Korn Shell on HP-UX 11.x Question about signals between two shells. First shell is the parent that kicks off the second shell. The first shell is going to ignore a standard set of signals, but I want the second shell to signal back to its parent if event X happens. Can I do something of... (5 Replies)
Discussion started by: google
5 Replies

4. UNIX for Dummies Questions & Answers

Signals...

(posted this in the scripting forum as well, but figured it should go here) So, what's going on is this: For our program, we had to create our own shell, and if the user pressed ctrl-c just at the cmdline, then this signal would be ignored, but if there is a foreground process running, let's... (0 Replies)
Discussion started by: blind melon
0 Replies

5. Programming

Using Signals

How can use signals in a C program If i want a child program to signal it's parent program that it(child) program has completed the task that it was assigned.:confused: (2 Replies)
Discussion started by: kapilv
2 Replies

6. Shell Programming and Scripting

A question about signals in Unix

Whats a signal 0. An exhaustive search on signals landed me nowhere. Is it possible to do something like this trap "echo $var" 0. If so what signal does this trap catch ? (2 Replies)
Discussion started by: kinny
2 Replies

7. UNIX for Dummies Questions & Answers

Help understanding signals

I am having trouble with folowing sigset_t s; // now s represents set of signals sigemptyset(&s) ; // initialize this set and exclude all the signals from it.is it empty? sigaddset(&s,SIGILL);//this set containts only SIGILL signal sigprocmask(SIG_BLOCK,&s,NULL);//lost on this one Can... (3 Replies)
Discussion started by: joker40
3 Replies

8. UNIX for Advanced & Expert Users

Help with Signals

Hi All, The problem statement is as below: Problem: A process (exe) is getting executed in background. The output of this process is getting logged in a file. After successfully running for some time the process gets terminated. In the log file following is present: ^M[7m Interrupt ^M[27m... (8 Replies)
Discussion started by: Praty.27
8 Replies

9. Shell Programming and Scripting

Help with trap and signals

I am having issues with trap not working inside a script. I am currently trying this on a Knoppix system V 5.1. What I would like to happen is when I press control c, a message gets echoed and the script is ended. For example: #! /bin/bash trap "echo CTRL c was pressed ; break" SIGINT... (11 Replies)
Discussion started by: Basherrr
11 Replies

10. UNIX for Dummies Questions & Answers

Do UNIX signals produce interrupts?

Hi folks! I have been reading Vahalia's Unix Internals book, which states the following in the chapter dedicated to signals: Given that, my understanding is that processes running in user mode don't become aware of signals until they switch to kernel mode, where the issig() function is called... (3 Replies)
Discussion started by: Tru69
3 Replies
runit-init(8)                                                 System Manager's Manual                                                runit-init(8)

NAME
init - a UNIX process no 1 SYNOPSIS
init [ 0 | 6 ] DESCRIPTION
runit-init is the first process the kernel starts. If runit-init is started as process no 1, it runs and replaces itself with runit(8). If runit-init is started while the system is up, it must be either called as init 0 or init 6: init 0 tells the Unix process no 1 to shutdown and halt the system. To signal runit(8) the system halt request, runit-init removes all permissions of the file /etc/runit/reboot (chmod 0), and sets the execute by owner permission of the file /etc/runit/stopit (chmod 100). Then a CONT signal is sent to runit(8). init 6 tells the Unix process no 1 to shutdown and reboot the system. To signal runit(8) the system reboot request, runit-init sets the execute by owner permission of the files /etc/runit/reboot and /etc/runit/stopit (chmod 100). Then a CONT signal is sent to runit(8). EXIT CODES
runit-init returns 111 on error, 0 in all other cases. SEE ALSO
runit(8), runsvdir(8), runsvchdir(8), sv(8), runsv(8), chpst(8), utmpset(8), svlogd(8) http://smarden.org/runit/ AUTHOR
Gerrit Pape <pape@smarden.org> runit-init(8)
All times are GMT -4. The time now is 02:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy