~ubuntu-branches/ubuntu/utopic/eglibc/utopic

« back to all changes in this revision

Viewing changes to debian/patches/hurd-i386/tg-hurdsig-global-dispositions.diff

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-10-26 05:14:58 UTC
  • mfrom: (1.5.1) (4.4.22 experimental)
  • Revision ID: package-import@ubuntu.com-20121026051458-oryotr4i03ob5pab
Tags: 2.16-0ubuntu1
* Merge with unreleased 2.16 in Debian experimental, remaining changes:
  - Drop the Breaks line from libc6, which refers to a Debian transition
  - Remove the libc6 recommends on libc6-i686, which we don't build
  - Enable libc6{,-dev}-armel on armhf and libc6{-dev}-armhf on armel
  - Ship update-locale and validlocale in /usr/sbin in libc-bin
  - Don't build locales or locales-all in Ubuntu, we rely on langpacks
  - Heavily mangle the way we do service restarting on major upgrades
  - Use different MIN_KERNEL_SUPPORTED versions than Debian, due to
    buildd needs.  This should be universally bumped to 3.2.0 once all
    our buildds (including the PPA guests) are running precise kernels
  - Build i386 variants as -march=i686, build amd64 with -O3, and build
    ppc64 variants (both 64-bit and 32-bit) with -O3 -fno-tree-vectorize
  - Re-enable unsubmitted-ldconfig-cache-abi.diff and rebuild the cache
    on upgrades from previous versions that used a different constant
  - debian/patches/any/local-CVE-2012-3406.diff: switch to malloc when
    array grows too large to handle via alloca extension (CVE-2012-3406)
  - Build generic i386/i686 flavour with -mno-tls-direct-seg-refs
* Changes added/dropped with this merge while reducing our delta:
  - Stop building glibc docs from the eglibc source, and instead make
    the glibc-docs stub have a hard dependency on glibc-doc-reference
  - Remove outdated conflicts against ancient versions of ia32-libs
  - Drop the tzdata dependency from libc6, it's in required and minimal
  - Use gcc-4.7/g++-4.7 by default on all our supported architectures
  - Save our historical changelog as changelog.ubuntu in the source
  - Drop nscd's libaudit build-dep for now, as libaudit is in universe
  - Drop the unnecessary Breaks from libc6 to locales and locales-all
  - Ship xen's ld.so.conf.d snippet as /etc/ld.so.conf.d/libc6-xen.conf
* Disable hard failures on the test suite for the first upload to raring

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    fb055f2 Hurd signals: fix global untraced signals.
13
13
 
14
14
---
15
 
 hurd/ctty-input.c                   |   18 ++-
16
 
 hurd/ctty-output.c                  |   18 ++-
17
 
 hurd/hurd/signal.h                  |   40 ++++--
18
 
 hurd/hurdexec.c                     |   11 +-
19
 
 hurd/hurdmsg.c                      |   27 +---
20
 
 hurd/hurdsig.c                      |  272 +++++++++++++++++++++++++++--------
21
 
 sysdeps/mach/hurd/fork.c            |    9 +-
22
 
 sysdeps/mach/hurd/i386/sigreturn.c  |   13 +-
23
 
 sysdeps/mach/hurd/i386/trampoline.c |    8 +-
24
 
 sysdeps/mach/hurd/sigaction.c       |   18 ++--
25
 
 sysdeps/mach/hurd/sigpending.c      |    9 +-
26
 
 sysdeps/mach/hurd/sigprocmask.c     |   11 +-
27
 
 sysdeps/mach/hurd/sigsuspend.c      |   19 ++--
28
 
 sysdeps/mach/hurd/sigwait.c         |   23 ++--
29
 
 sysdeps/mach/hurd/spawni.c          |   23 ++--
 
15
 hurd/ctty-input.c                   |   18 +-
 
16
 hurd/ctty-output.c                  |   18 +-
 
17
 hurd/hurd/signal.h                  |   40 +++--
 
18
 hurd/hurdexec.c                     |   11 -
 
19
 hurd/hurdmsg.c                      |   27 ---
 
20
 hurd/hurdsig.c                      |  272 +++++++++++++++++++++++++++---------
 
21
 sysdeps/mach/hurd/fork.c            |    9 -
 
22
 sysdeps/mach/hurd/i386/sigreturn.c  |   13 -
 
23
 sysdeps/mach/hurd/i386/trampoline.c |    8 -
 
24
 sysdeps/mach/hurd/sigaction.c       |   18 +-
 
25
 sysdeps/mach/hurd/sigpending.c      |    9 -
 
26
 sysdeps/mach/hurd/sigprocmask.c     |   11 -
 
27
 sysdeps/mach/hurd/sigsuspend.c      |   19 +-
 
28
 sysdeps/mach/hurd/sigwait.c         |   23 +--
 
29
 sysdeps/mach/hurd/spawni.c          |   23 +--
30
30
 15 files changed, 350 insertions(+), 169 deletions(-)
31
31
 
32
 
diff --git a/hurd/ctty-input.c b/hurd/ctty-input.c
33
 
index ef8395a..4da33c7 100644
34
32
--- a/hurd/ctty-input.c
35
33
+++ b/hurd/ctty-input.c
36
34
@@ -1,5 +1,5 @@
40
38
    This file is part of the GNU C Library.
41
39
 
42
40
    The GNU C Library is free software; you can redistribute it and/or
43
 
@@ -44,12 +44,15 @@ _hurd_ctty_input (io_t port, io_t ctty, error_t (*rpc) (io_t))
 
41
@@ -43,12 +43,15 @@
44
42
          else
45
43
            {
46
44
              struct hurd_sigstate *ss = _hurd_self_sigstate ();
59
57
 
60
58
              if (err == EBACKGROUND)
61
59
                {
62
 
@@ -66,10 +69,11 @@ _hurd_ctty_input (io_t port, io_t ctty, error_t (*rpc) (io_t))
 
60
@@ -65,10 +68,11 @@
63
61
                     SIGTTIN or resumed after being stopped.  Now this is
64
62
                     still a "system call", so check to see if we should
65
63
                  restart it.  */
74
72
                }
75
73
            }
76
74
        }
77
 
diff --git a/hurd/ctty-output.c b/hurd/ctty-output.c
78
 
index 92ab95a..6e4bd74 100644
79
75
--- a/hurd/ctty-output.c
80
76
+++ b/hurd/ctty-output.c
81
77
@@ -1,5 +1,5 @@
85
81
    This file is part of the GNU C Library.
86
82
 
87
83
    The GNU C Library is free software; you can redistribute it and/or
88
 
@@ -35,16 +35,19 @@ _hurd_ctty_output (io_t port, io_t ctty, error_t (*rpc) (io_t))
 
84
@@ -34,16 +34,19 @@
89
85
 
90
86
       do
91
87
        {
108
104
 
109
105
          if (err)
110
106
            return (*rpc) (port);
111
 
@@ -71,10 +74,11 @@ _hurd_ctty_output (io_t port, io_t ctty, error_t (*rpc) (io_t))
 
107
@@ -70,10 +73,11 @@
112
108
                     SIGTTOU or resumed after being stopped.  Now this is
113
109
                     still a "system call", so check to see if we should
114
110
                  restart it.  */
123
119
                }
124
120
            }
125
121
          /* If the last RPC generated a SIGTTOU, loop to try it again.  */
126
 
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
127
 
index 21e30c5..1c4733a 100644
128
122
--- a/hurd/hurd/signal.h
129
123
+++ b/hurd/hurd/signal.h
130
124
@@ -1,5 +1,5 @@
134
128
        Free Software Foundation, Inc.
135
129
    This file is part of the GNU C Library.
136
130
 
137
 
@@ -71,7 +71,13 @@ struct hurd_sigstate
 
131
@@ -70,7 +70,13 @@
138
132
 
139
133
     sigset_t blocked;          /* What signals are blocked.  */
140
134
     sigset_t pending;          /* Pending signals, possibly blocked.  */
148
142
     struct sigaltstack sigaltstack;
149
143
 
150
144
     /* Chain of thread-local signal preemptors; see <hurd/sigpreempt.h>.
151
 
@@ -127,6 +133,26 @@ extern struct hurd_sigstate *_hurd_self_sigstate (void)
 
145
@@ -126,6 +132,26 @@
152
146
        by different threads.  */
153
147
      __attribute__ ((__const__));
154
148
 
175
169
 #ifndef _HURD_SIGNAL_H_EXTERN_INLINE
176
170
 #define _HURD_SIGNAL_H_EXTERN_INLINE __extern_inline
177
171
 #endif
178
 
@@ -150,12 +176,6 @@ extern thread_t _hurd_msgport_thread;
 
172
@@ -151,12 +177,6 @@
179
173
 
180
174
 extern mach_port_t _hurd_msgport;
181
175
 
188
182
 /* Resource limit on core file size.  Enforced by hurdsig.c.  */
189
183
 extern int _hurd_core_limit;
190
184
 
191
 
@@ -203,10 +223,10 @@ _hurd_critical_section_unlock (void *our_lock)
 
185
@@ -211,10 +231,10 @@
192
186
       /* It was us who acquired the critical section lock.  Unlock it.  */
193
 
       struct hurd_sigstate *ss = our_lock;
 
187
       struct hurd_sigstate *ss = (struct hurd_sigstate *) our_lock;
194
188
       sigset_t pending;
195
189
-      __spin_lock (&ss->lock);
196
190
+      _hurd_sigstate_lock (ss);
202
196
       if (! __sigisemptyset (&pending))
203
197
        /* There are unblocked signals pending, which weren't
204
198
           delivered because we were in the critical section.
205
 
diff --git a/hurd/hurdexec.c b/hurd/hurdexec.c
206
 
index beae869..ee3162f 100644
207
199
--- a/hurd/hurdexec.c
208
200
+++ b/hurd/hurdexec.c
209
201
@@ -1,4 +1,4 @@
212
204
        Free Software Foundation, Inc.
213
205
    This file is part of the GNU C Library.
214
206
 
215
 
@@ -109,12 +109,13 @@ _hurd_exec (task_t task, file_t file,
 
207
@@ -108,12 +108,13 @@
216
208
   assert (! __spin_lock_locked (&ss->critical_section_lock));
217
209
   __spin_lock (&ss->critical_section_lock);
218
210
 
229
221
       ints[INIT_SIGIGN] |= __sigmask (i);
230
222
 
231
223
   /* We hold the sigstate lock until the exec has failed so that no signal
232
 
@@ -125,7 +126,7 @@ _hurd_exec (task_t task, file_t file,
 
224
@@ -124,7 +125,7 @@
233
225
      critical section flag avoids anything we call trying to acquire the
234
226
      sigstate lock.  */
235
227
 
238
230
 
239
231
   /* Pack up the descriptor table to give the new program.  */
240
232
   __mutex_lock (&_hurd_dtable_lock);
241
 
diff --git a/hurd/hurdmsg.c b/hurd/hurdmsg.c
242
 
index ffcce61..fdc7551 100644
243
233
--- a/hurd/hurdmsg.c
244
234
+++ b/hurd/hurdmsg.c
245
235
@@ -1,4 +1,5 @@
249
239
    This file is part of the GNU C Library.
250
240
 
251
241
    The GNU C Library is free software; you can redistribute it and/or
252
 
@@ -122,17 +123,9 @@ get_int (int which, int *value)
 
242
@@ -121,17 +122,9 @@
253
243
     case INIT_UMASK:
254
244
       *value = _hurd_umask;
255
245
       return 0;
268
258
        __spin_lock (&ss->lock);
269
259
        *value = ss->pending;
270
260
        __spin_unlock (&ss->lock);
271
 
@@ -140,7 +133,7 @@ get_int (int which, int *value)
 
261
@@ -139,7 +132,7 @@
272
262
       }
273
263
     case INIT_SIGIGN:
274
264
       {
277
267
        sigset_t ign;
278
268
        int sig;
279
269
        __spin_lock (&ss->lock);
280
 
@@ -208,17 +201,9 @@ set_int (int which, int value)
 
270
@@ -207,17 +200,9 @@
281
271
       return 0;
282
272
 
283
273
       /* These are pretty odd things to do.  But you asked for it.  */
296
286
        __spin_lock (&ss->lock);
297
287
        ss->pending = value;
298
288
        __spin_unlock (&ss->lock);
299
 
@@ -226,7 +211,7 @@ set_int (int which, int value)
 
289
@@ -225,7 +210,7 @@
300
290
       }
301
291
     case INIT_SIGIGN:
302
292
       {
305
295
        int sig;
306
296
        const sigset_t ign = value;
307
297
        __spin_lock (&ss->lock);
308
 
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
309
 
index 74a01a6..67037e8 100644
310
298
--- a/hurd/hurdsig.c
311
299
+++ b/hurd/hurdsig.c
312
 
@@ -44,9 +44,6 @@ mach_port_t _hurd_msgport;
 
300
@@ -43,9 +43,6 @@
313
301
 /* Thread listening on it.  */
314
302
 thread_t _hurd_msgport_thread;
315
303
 
319
307
 /* These are set up by _hurdsig_init.  */
320
308
 unsigned long int __hurd_sigthread_stack_base;
321
309
 unsigned long int __hurd_sigthread_stack_end;
322
 
@@ -55,6 +52,9 @@ unsigned long int *__hurd_sigthread_variables;
 
310
@@ -54,6 +51,9 @@
323
311
 /* Linked-list of per-thread signal state.  */
324
312
 struct hurd_sigstate *_hurd_sigstates;
325
313
 
329
317
 /* Timeout for RPC's after interrupt_operation. */
330
318
 mach_msg_timeout_t _hurd_interrupted_rpc_timeout = 3000;
331
319
 
332
 
@@ -83,7 +83,7 @@ _hurd_thread_sigstate (thread_t thread)
 
320
@@ -82,7 +82,7 @@
333
321
     {
334
322
       ss = malloc (sizeof (*ss));
335
323
       if (ss == NULL)
338
326
       ss->thread = thread;
339
327
       __spin_lock_init (&ss->lock);
340
328
 
341
 
@@ -96,16 +96,19 @@ _hurd_thread_sigstate (thread_t thread)
 
329
@@ -95,16 +95,19 @@
342
330
       ss->intr_port = MACH_PORT_NULL;
343
331
       ss->context = NULL;
344
332
 
366
354
          if (s)
367
355
            {
368
356
              __spin_lock (&s->lock);
369
 
@@ -114,14 +117,108 @@ _hurd_thread_sigstate (thread_t thread)
 
357
@@ -113,14 +116,108 @@
370
358
            }
371
359
          else
372
360
            default_sigaction (ss->actions);
478
466
 
479
467
 /* Signal delivery itself is on this page.  */
480
468
 
481
 
@@ -216,6 +313,8 @@ static void
 
469
@@ -215,6 +312,8 @@
482
470
 abort_thread (struct hurd_sigstate *ss, struct machine_thread_all_state *state,
483
471
              void (*reply) (void))
484
472
 {
487
475
   if (!(state->set & THREAD_ABORTED))
488
476
     {
489
477
       error_t err = __thread_abort (ss->thread);
490
 
@@ -355,7 +454,7 @@ _hurdsig_abort_rpcs (struct hurd_sigstate *ss, int signo, int sigthread,
 
478
@@ -354,7 +453,7 @@
491
479
           call above will retry their RPCs unless we clear SS->intr_port.
492
480
           So we clear it for the thread taking a signal when SA_RESTART is
493
481
           clear, so that its call returns EINTR.  */
496
484
          ss->intr_port = MACH_PORT_NULL;
497
485
       }
498
486
 
499
 
@@ -478,9 +577,11 @@ weak_alias (_hurdsig_preemptors, _hurdsig_preempters)
 
487
@@ -477,9 +576,11 @@
500
488
                  sigmask (SIGSTOP) | sigmask (SIGTSTP))
501
489
 
502
490
 /* Actual delivery of a single signal.  Called with SS unlocked.  When
511
499
 post_signal (struct hurd_sigstate *ss,
512
500
             int signo, struct hurd_signal_detail *detail,
513
501
             int untraced, void (*reply) (void))
514
 
@@ -533,8 +634,12 @@ post_signal (struct hurd_sigstate *ss,
 
502
@@ -532,8 +633,12 @@
515
503
       assert_perror (err);
516
504
       for (i = 0; i < nthreads; ++i)
517
505
        {
526
514
            {
527
515
              err = __thread_resume (threads[i]);
528
516
              assert_perror (err);
529
 
@@ -547,9 +652,6 @@ post_signal (struct hurd_sigstate *ss,
 
517
@@ -546,9 +651,6 @@
530
518
                       (vm_address_t) threads,
531
519
                       nthreads * sizeof *threads);
532
520
       _hurd_stopped = 0;
536
524
     }
537
525
 
538
526
   error_t err;
539
 
@@ -565,13 +667,43 @@ post_signal (struct hurd_sigstate *ss,
 
527
@@ -564,13 +666,43 @@
540
528
        }
541
529
 
542
530
       /* This call is just to check for pending signals.  */
583
571
 
584
572
   /* Check for a preempted signal.  Preempted signals can arrive during
585
573
      critical sections.  */
586
 
@@ -629,12 +761,12 @@ post_signal (struct hurd_sigstate *ss,
 
574
@@ -628,12 +760,12 @@
587
575
            mark_pending ();
588
576
          else
589
577
            suspend ();
599
587
 
600
588
       if (handler == SIG_DFL)
601
589
        /* Figure out the default action for this signal.  */
602
 
@@ -728,7 +860,7 @@ post_signal (struct hurd_sigstate *ss,
 
590
@@ -727,7 +859,7 @@
603
591
 
604
592
   /* Handle receipt of a blocked signal, or any signal while stopped.  */
605
593
   if (act != ignore &&         /* Signals ignored now are forgotten now.  */
608
596
       (signo != SIGKILL && _hurd_stopped))
609
597
     {
610
598
       mark_pending ();
611
 
@@ -764,6 +896,7 @@ post_signal (struct hurd_sigstate *ss,
 
599
@@ -763,6 +895,7 @@
612
600
         now's the time to set it going. */
613
601
       if (ss_suspended)
614
602
        {
616
604
          err = __thread_resume (ss->thread);
617
605
          assert_perror (err);
618
606
          ss_suspended = 0;
619
 
@@ -808,6 +941,8 @@ post_signal (struct hurd_sigstate *ss,
 
607
@@ -807,6 +940,8 @@
620
608
        struct sigcontext *scp, ocontext;
621
609
        int wait_for_reply, state_changed;
622
610
 
625
613
        /* Stop the thread and abort its pending RPC operations.  */
626
614
        if (! ss_suspended)
627
615
          {
628
 
@@ -942,23 +1077,25 @@ post_signal (struct hurd_sigstate *ss,
 
616
@@ -941,23 +1076,25 @@
629
617
            }
630
618
        }
631
619
 
655
643
 
656
644
        /* Any sigsuspend call must return after the handler does.  */
657
645
        wake_sigsuspend (ss);
658
 
@@ -976,7 +1113,7 @@ post_signal (struct hurd_sigstate *ss,
 
646
@@ -975,7 +1112,7 @@
659
647
       }
660
648
     }
661
649
 
664
652
 }
665
653
 
666
654
 /* Return the set of pending signals in SS which should be delivered. */
667
 
@@ -991,7 +1128,7 @@ pending_signals (struct hurd_sigstate *ss)
 
655
@@ -990,7 +1127,7 @@
668
656
   if (_hurd_stopped || __spin_lock_locked (&ss->critical_section_lock))
669
657
     return 0;
670
658
 
673
661
 }
674
662
 
675
663
 /* Post the specified pending signals in SS and return 1.  If one of
676
 
@@ -1003,12 +1140,15 @@ post_pending (struct hurd_sigstate *ss, sigset_t pending, void (*reply) (void))
 
664
@@ -1002,12 +1139,15 @@
677
665
   int signo;
678
666
   struct hurd_signal_detail detail;
679
667
 
692
680
 
693
681
        /* Will reacquire the lock, except if the signal is traced.  */
694
682
        if (! post_signal (ss, signo, &detail, 0, reply))
695
 
@@ -1016,7 +1156,7 @@ post_pending (struct hurd_sigstate *ss, sigset_t pending, void (*reply) (void))
 
683
@@ -1015,7 +1155,7 @@
696
684
       }
697
685
 
698
686
   /* No more signals pending; SS->lock is still locked.  */
701
689
 
702
690
   return 1;
703
691
 }
704
 
@@ -1034,14 +1174,14 @@ post_all_pending_signals (void (*reply) (void))
 
692
@@ -1033,14 +1173,14 @@
705
693
       __mutex_lock (&_hurd_siglock);
706
694
       for (ss = _hurd_sigstates; ss != NULL; ss = ss->next)
707
695
         {
718
706
        }
719
707
       __mutex_unlock (&_hurd_siglock);
720
708
 
721
 
@@ -1074,11 +1214,12 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
 
709
@@ -1073,11 +1213,12 @@
722
710
        assert_perror (err);
723
711
     }
724
712
 
733
721
     {
734
722
       /* The signal has either been ignored or is now being handled.  We can
735
723
         consider it delivered and reply to the killer.  */
736
 
@@ -1090,8 +1231,9 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
 
724
@@ -1089,8 +1230,9 @@
737
725
     }
738
726
   else
739
727
     {
745
733
       if (! post_all_pending_signals (reply))
746
734
        return;
747
735
 
748
 
@@ -1217,9 +1359,10 @@ _S_msg_sig_post (mach_port_t me,
 
736
@@ -1216,9 +1358,10 @@
749
737
   d.code = sigcode;
750
738
   d.exc = 0;
751
739
 
759
747
                              signo, &d, reply_port, reply_port_type,
760
748
                              0); /* Stop if traced.  */
761
749
 
762
 
@@ -1247,7 +1390,7 @@ _S_msg_sig_post_untraced (mach_port_t me,
 
750
@@ -1246,7 +1389,7 @@
763
751
 
764
752
   /* Post the signal to the designated signal-receiving thread.  This will
765
753
      reply when the signal can be considered delivered.  */
768
756
                              signo, &d, reply_port, reply_port_type,
769
757
                              1); /* Untraced flag. */
770
758
 
771
 
@@ -1258,8 +1401,8 @@ extern void __mig_init (void *);
 
759
@@ -1257,8 +1400,8 @@
772
760
 
773
761
 #include <mach/task_special_ports.h>
774
762
 
779
767
 
780
768
 void
781
769
 _hurdsig_init (const int *intarray, size_t intarraysize)
782
 
@@ -1282,27 +1425,34 @@ _hurdsig_init (const int *intarray, size_t intarraysize)
 
770
@@ -1281,27 +1424,34 @@
783
771
                                  MACH_MSG_TYPE_MAKE_SEND);
784
772
   assert_perror (err);
785
773
 
822
810
   /* Start the signal thread listening on the message port.  */
823
811
 
824
812
   if (__hurd_threadvar_stack_mask == 0)
825
 
diff --git a/sysdeps/mach/hurd/fork.c b/sysdeps/mach/hurd/fork.c
826
 
index 66fa7e2..bae4204 100644
827
813
--- a/sysdeps/mach/hurd/fork.c
828
814
+++ b/sysdeps/mach/hurd/fork.c
829
 
@@ -459,6 +459,7 @@ __fork (void)
 
815
@@ -458,6 +458,7 @@
830
816
         function, accounted for by mach_port_names (and which will thus be
831
817
         accounted for in the child below).  This extra right gets consumed
832
818
         in the child by the store into _hurd_sigthread in the child fork.  */
834
820
       if (thread_refs > 1 &&
835
821
          (err = __mach_port_mod_refs (newtask, ss->thread,
836
822
                                       MACH_PORT_RIGHT_SEND,
837
 
@@ -616,10 +617,6 @@ __fork (void)
 
823
@@ -620,10 +621,6 @@
838
824
       for (i = 0; i < _hurd_nports; ++i)
839
825
        __spin_unlock (&_hurd_ports[i].lock);
840
826
 
845
831
       /* Claim our sigstate structure and unchain the rest: the
846
832
         threads existed in the parent task but don't exist in this
847
833
         task (the child process).  Delay freeing them until later
848
 
@@ -640,6 +637,10 @@ __fork (void)
 
834
@@ -644,6 +641,10 @@
849
835
       _hurd_sigstates = ss;
850
836
       __mutex_unlock (&_hurd_siglock);
851
837
 
856
842
       /* Fetch our new process IDs from the proc server.  No need to
857
843
         refetch our pgrp; it is always inherited from the parent (so
858
844
         _hurd_pgrp is already correct), and the proc server will send us a
859
 
diff --git a/sysdeps/mach/hurd/i386/sigreturn.c b/sysdeps/mach/hurd/i386/sigreturn.c
860
 
index 60b0d00..8cb92ef 100644
861
845
--- a/sysdeps/mach/hurd/i386/sigreturn.c
862
846
+++ b/sysdeps/mach/hurd/i386/sigreturn.c
863
847
@@ -1,4 +1,5 @@
867
851
    This file is part of the GNU C Library.
868
852
 
869
853
    The GNU C Library is free software; you can redistribute it and/or
870
 
@@ -39,7 +40,7 @@ __sigreturn (struct sigcontext *scp)
 
854
@@ -38,7 +39,7 @@
871
855
     }
872
856
 
873
857
   ss = _hurd_self_sigstate ();
876
860
 
877
861
   /* Remove the link on the `active resources' chain added by
878
862
      _hurd_setup_sighandler.  Its purpose was to make sure
879
 
@@ -51,19 +52,19 @@ __sigreturn (struct sigcontext *scp)
 
863
@@ -50,19 +51,19 @@
880
864
   ss->intr_port = scp->sc_intr_port;
881
865
 
882
866
   /* Check for pending signals that were blocked by the old set.  */
899
883
       ss->context = NULL;
900
884
     }
901
885
 
902
 
@@ -74,7 +75,7 @@ __sigreturn (struct sigcontext *scp)
 
886
@@ -73,7 +74,7 @@
903
887
       abort ();
904
888
     }
905
889
   else
908
892
 
909
893
   /* Destroy the MiG reply port used by the signal handler, and restore the
910
894
      reply port in use by the thread when interrupted.  */
911
 
diff --git a/sysdeps/mach/hurd/i386/trampoline.c b/sysdeps/mach/hurd/i386/trampoline.c
912
 
index 99d9308..ec52847 100644
913
895
--- a/sysdeps/mach/hurd/i386/trampoline.c
914
896
+++ b/sysdeps/mach/hurd/i386/trampoline.c
915
897
@@ -1,5 +1,5 @@
919
901
        Free Software Foundation, Inc.
920
902
    This file is part of the GNU C Library.
921
903
 
922
 
@@ -77,7 +77,11 @@ _hurd_setup_sighandler (struct hurd_sigstate *ss, __sighandler_t handler,
 
904
@@ -76,7 +76,11 @@
923
905
      interrupted RPC frame.  */
924
906
   state->basic.esp = state->basic.uesp;
925
907
 
932
914
       !(ss->sigaltstack.ss_flags & (SS_DISABLE|SS_ONSTACK)))
933
915
     {
934
916
       sigsp = ss->sigaltstack.ss_sp + ss->sigaltstack.ss_size;
935
 
diff --git a/sysdeps/mach/hurd/sigaction.c b/sysdeps/mach/hurd/sigaction.c
936
 
index fe452e8..bedf14c 100644
937
917
--- a/sysdeps/mach/hurd/sigaction.c
938
918
+++ b/sysdeps/mach/hurd/sigaction.c
939
919
@@ -1,4 +1,4 @@
942
922
      Free Software Foundation, Inc.
943
923
 
944
924
    This file is part of the GNU C Library.
945
 
@@ -51,15 +51,15 @@ __sigaction (sig, act, oact)
 
925
@@ -50,15 +50,15 @@
946
926
   ss = _hurd_self_sigstate ();
947
927
 
948
928
   __spin_lock (&ss->critical_section_lock);
962
942
 
963
943
       /* Inform the proc server whether or not it should send us SIGCHLD for
964
944
         stopped children.  We do this in a critical section so that no
965
 
@@ -67,8 +67,8 @@ __sigaction (sig, act, oact)
 
945
@@ -66,8 +66,8 @@
966
946
       __USEPORT (PROC,
967
947
                 __proc_mod_stopchild (port, !(a.sa_flags & SA_NOCLDSTOP)));
968
948
 
973
953
     }
974
954
   else if (act != NULL && (a.sa_handler == SIG_IGN || a.sa_handler == SIG_DFL))
975
955
     /* We are changing to an action that might be to ignore SIG signals.
976
 
@@ -77,11 +77,11 @@ __sigaction (sig, act, oact)
 
956
@@ -76,11 +76,11 @@
977
957
        back and then SIG is unblocked, the signal pending now should not
978
958
        arrive.  So wake up the signal thread to check the new state and do
979
959
        the right thing.  */
987
967
   __spin_unlock (&ss->critical_section_lock);
988
968
 
989
969
   if (pending)
990
 
diff --git a/sysdeps/mach/hurd/sigpending.c b/sysdeps/mach/hurd/sigpending.c
991
 
index 84ac927..f582d45 100644
992
970
--- a/sysdeps/mach/hurd/sigpending.c
993
971
+++ b/sysdeps/mach/hurd/sigpending.c
994
972
@@ -1,4 +1,5 @@
998
976
    This file is part of the GNU C Library.
999
977
 
1000
978
    The GNU C Library is free software; you can redistribute it and/or
1001
 
@@ -38,9 +39,9 @@ sigpending (set)
 
979
@@ -37,9 +38,9 @@
1002
980
     }
1003
981
 
1004
982
   ss = _hurd_self_sigstate ();
1011
989
 
1012
990
   *set = pending;
1013
991
   return 0;
1014
 
diff --git a/sysdeps/mach/hurd/sigprocmask.c b/sysdeps/mach/hurd/sigprocmask.c
1015
 
index cbb5ecc..b12dc19 100644
1016
992
--- a/sysdeps/mach/hurd/sigprocmask.c
1017
993
+++ b/sysdeps/mach/hurd/sigprocmask.c
1018
994
@@ -1,4 +1,5 @@
1022
998
    This file is part of the GNU C Library.
1023
999
 
1024
1000
    The GNU C Library is free software; you can redistribute it and/or
1025
 
@@ -40,7 +41,7 @@ __sigprocmask (how, set, oset)
 
1001
@@ -39,7 +40,7 @@
1026
1002
 
1027
1003
   ss = _hurd_self_sigstate ();
1028
1004
 
1031
1007
 
1032
1008
   old = ss->blocked;
1033
1009
 
1034
 
@@ -61,7 +62,7 @@ __sigprocmask (how, set, oset)
 
1010
@@ -60,7 +61,7 @@
1035
1011
          break;
1036
1012
 
1037
1013
        default:
1040
1016
          errno = EINVAL;
1041
1017
          return -1;
1042
1018
        }
1043
 
@@ -69,9 +70,9 @@ __sigprocmask (how, set, oset)
 
1019
@@ -68,9 +69,9 @@
1044
1020
       ss->blocked &= ~_SIG_CANT_MASK;
1045
1021
     }
1046
1022
 
1052
1028
 
1053
1029
   if (oset != NULL)
1054
1030
     *oset = old;
1055
 
diff --git a/sysdeps/mach/hurd/sigsuspend.c b/sysdeps/mach/hurd/sigsuspend.c
1056
 
index 7e32472..2e55e30 100644
1057
1031
--- a/sysdeps/mach/hurd/sigsuspend.c
1058
1032
+++ b/sysdeps/mach/hurd/sigsuspend.c
1059
1033
@@ -1,5 +1,5 @@
1064
1038
 
1065
1039
    This file is part of the GNU C Library.
1066
1040
 
1067
 
@@ -43,7 +43,7 @@ __sigsuspend (set)
 
1041
@@ -42,7 +42,7 @@
1068
1042
 
1069
1043
   ss = _hurd_self_sigstate ();
1070
1044
 
1073
1047
 
1074
1048
   oldmask = ss->blocked;
1075
1049
   if (set != NULL)
1076
 
@@ -51,11 +51,11 @@ __sigsuspend (set)
 
1050
@@ -50,11 +50,11 @@
1077
1051
     ss->blocked = newmask & ~_SIG_CANT_MASK;
1078
1052
 
1079
1053
   /* Notice if any pending signals just became unblocked.  */
1087
1061
 
1088
1062
   if (pending)
1089
1063
     /* Tell the signal thread to check for pending signals.  */
1090
 
@@ -66,10 +66,11 @@ __sigsuspend (set)
 
1064
@@ -65,10 +65,11 @@
1091
1065
              MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
1092
1066
   __mach_port_destroy (__mach_task_self (), wait);
1093
1067
 
1103
1077
 
1104
1078
   if (pending)
1105
1079
     /* Tell the signal thread to check for pending signals.  */
1106
 
diff --git a/sysdeps/mach/hurd/sigwait.c b/sysdeps/mach/hurd/sigwait.c
1107
 
index 9794076..af50f74 100644
1108
1080
--- a/sysdeps/mach/hurd/sigwait.c
1109
1081
+++ b/sysdeps/mach/hurd/sigwait.c
1110
1082
@@ -1,4 +1,4 @@
1113
1085
    This file is part of the GNU C Library.
1114
1086
 
1115
1087
    The GNU C Library is free software; you can redistribute it and/or
1116
 
@@ -28,7 +28,7 @@ int
 
1088
@@ -27,7 +27,7 @@
1117
1089
 __sigwait (const sigset_t *set, int *sig)
1118
1090
 {
1119
1091
   struct hurd_sigstate *ss;
1122
1094
   int signo = 0;
1123
1095
   struct hurd_signal_preemptor preemptor;
1124
1096
   jmp_buf buf;
1125
 
@@ -50,8 +50,8 @@ __sigwait (const sigset_t *set, int *sig)
 
1097
@@ -49,8 +49,8 @@
1126
1098
       /* Make sure this is all kosher */
1127
1099
       assert (__sigismember (&mask, signo));
1128
1100
 
1133
1105
 
1134
1106
       return pe->handler;
1135
1107
     }
1136
 
@@ -72,10 +72,11 @@ __sigwait (const sigset_t *set, int *sig)
 
1108
@@ -71,10 +71,11 @@
1137
1109
     __sigemptyset (&mask);
1138
1110
 
1139
1111
   ss = _hurd_self_sigstate ();
1147
1119
   if (! __sigisemptyset (&ready))
1148
1120
     {
1149
1121
       for (signo = 1; signo < NSIG; signo++)
1150
 
@@ -103,7 +104,11 @@ __sigwait (const sigset_t *set, int *sig)
 
1122
@@ -102,7 +103,11 @@
1151
1123
       preemptor.next = ss->preemptors;
1152
1124
       ss->preemptors = &preemptor;
1153
1125
 
1160
1132
 
1161
1133
       /* Wait. */
1162
1134
       __mach_msg (&msg, MACH_RCV_MSG, 0, sizeof (msg), wait,
1163
 
@@ -114,7 +119,7 @@ __sigwait (const sigset_t *set, int *sig)
 
1135
@@ -113,7 +118,7 @@
1164
1136
     {
1165
1137
       assert (signo);
1166
1138
 
1169
1141
 
1170
1142
       /* Delete our preemptor. */
1171
1143
       assert (ss->preemptors == &preemptor);
1172
 
@@ -123,7 +128,7 @@ __sigwait (const sigset_t *set, int *sig)
 
1144
@@ -122,7 +127,7 @@
1173
1145
 
1174
1146
 
1175
1147
 all_done:
1178
1150
 
1179
1151
   __mach_port_destroy (__mach_task_self (), wait);
1180
1152
   *sig = signo;
1181
 
diff --git a/sysdeps/mach/hurd/spawni.c b/sysdeps/mach/hurd/spawni.c
1182
 
index 3d2b591..c12f448 100644
1183
1153
--- a/sysdeps/mach/hurd/spawni.c
1184
1154
+++ b/sysdeps/mach/hurd/spawni.c
1185
 
@@ -239,26 +239,29 @@ __spawni (pid_t *pid, const char *file,
 
1155
@@ -238,26 +238,29 @@
1186
1156
   assert (! __spin_lock_locked (&ss->critical_section_lock));
1187
1157
   __spin_lock (&ss->critical_section_lock);
1188
1158
 
1222
1192
 
1223
1193
   /* Set signal mask.  */
1224
1194
   if ((flags & POSIX_SPAWN_SETSIGMASK) != 0)
1225
 
tg: (c2fb0b6..) t/hurdsig-global-dispositions (depends on: t/hurdsig-fixes)