Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146651942
D3365.id7896.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1011 B
Referenced Files
None
Subscribers
None
D3365.id7896.diff
View Options
Index: head/sys/kern/kern_sig.c
===================================================================
--- head/sys/kern/kern_sig.c
+++ head/sys/kern/kern_sig.c
@@ -952,6 +952,7 @@
void
execsigs(struct proc *p)
{
+ sigset_t osigignore;
struct sigacts *ps;
int sig;
struct thread *td;
@@ -971,6 +972,24 @@
if ((sigprop(sig) & SA_IGNORE) != 0)
sigqueue_delete_proc(p, sig);
}
+
+ /*
+ * As CloudABI processes cannot modify signal handlers, fully
+ * reset all signals to their default behavior. Do ignore
+ * SIGPIPE, as it would otherwise be impossible to recover from
+ * writes to broken pipes and sockets.
+ */
+ if (SV_PROC_ABI(p) == SV_ABI_CLOUDABI) {
+ osigignore = ps->ps_sigignore;
+ while (SIGNOTEMPTY(osigignore)) {
+ sig = sig_ffs(&osigignore);
+ SIGDELSET(osigignore, sig);
+ if (sig != SIGPIPE)
+ sigdflt(ps, sig);
+ }
+ SIGADDSET(ps->ps_sigignore, SIGPIPE);
+ }
+
/*
* Reset stack state to the user stack.
* Clear set of signals caught on the signal stack.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 5, 10:44 AM (15 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29281817
Default Alt Text
D3365.id7896.diff (1011 B)
Attached To
Mode
D3365: Unignore signals when starting CloudABI processes.
Attached
Detach File
Event Timeline
Log In to Comment