Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows services to learn how a signal will be handled if sent to a given process. Implementation in PM parallels sig_proc() but does not change any state.
- Loading branch information
Showing
10 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
#ifndef _MINIX_SIGHANDLED_H | ||
#define _MINIX_SIGHANDLED_H | ||
|
||
#include <minix/endpoint.h> | ||
|
||
int sighandled(endpoint_t who, int signo); | ||
|
||
/* Which behaviour would the process have in front of some signal: */ | ||
#define SIG_IS_IGNORED 0x0001 /* signal is to be ignored */ | ||
#define SIG_IS_CAUGHT 0x0002 /* there is a signal handler */ | ||
#define SIG_IS_KILLER 0x0004 /* signal kills the process */ | ||
#define SIG_IS_STOPPER 0x0008 /* signal stops the process */ | ||
#define SIG_IS_CONT 0x0010 /* signal restarts the process */ | ||
#define SIG_IS_SYSMSG 0x0020 /* signal is transformed into message */ | ||
#define SIG_IS_BLOCKED 0x0080 /* signal is blocked/masked */ | ||
|
||
#define SIG_IS_PENDING 0x0100 /* a new signal is pending delivery */ | ||
|
||
#define PROC_IS_STOPPED 0x1000 /* the process is stopped (job control) */ | ||
#define PROC_IS_PAUSED 0x2000 /* the process waits (pause, sigsuspend) */ | ||
#define PGRP_IS_ORPHAN 0x8000 /* its process group is orphaned */ | ||
|
||
#endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include "syslib.h" | ||
#include <minix/sighandled.h> | ||
|
||
int | ||
sighandled(endpoint_t who, int signo) | ||
{ | ||
message m; | ||
|
||
m.m1_i1 = who; | ||
m.m1_i2 = signo; | ||
return(_syscall(PM_PROC_NR, SIGHANDLED, &m)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters