Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: runtime/bin/process_macos.cc

Issue 169893003: Another round of cleanups for http://www.dartbug.com/15922 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "bin/process.h" 8 #include "bin/process.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 handler = handler->next(); 737 handler = handler->next();
738 } 738 }
739 if (listen) { 739 if (listen) {
740 struct sigaction act; 740 struct sigaction act;
741 bzero(&act, sizeof(act)); 741 bzero(&act, sizeof(act));
742 act.sa_handler = SignalHandler; 742 act.sa_handler = SignalHandler;
743 sigemptyset(&act.sa_mask); 743 sigemptyset(&act.sa_mask);
744 for (int i = 0; i < kSignalsCount; i++) { 744 for (int i = 0; i < kSignalsCount; i++) {
745 sigaddset(&act.sa_mask, kSignals[i]); 745 sigaddset(&act.sa_mask, kSignals[i]);
746 } 746 }
747 int status = TEMP_FAILURE_RETRY_BLOCK_SIGNALS( 747 intptr_t status = TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
748 sigaction(signal, &act, NULL)); 748 sigaction(signal, &act, NULL));
749 if (status < 0) { 749 if (status < 0) {
750 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[0])); 750 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[0]));
751 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[1])); 751 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[1]));
752 return -1; 752 return -1;
753 } 753 }
754 } 754 }
755 if (signal_handlers == NULL) { 755 if (signal_handlers == NULL) {
756 signal_handlers = new SignalInfo(fds[1], signal); 756 signal_handlers = new SignalInfo(fds[1], signal);
757 } else { 757 } else {
(...skipping 30 matching lines...) Expand all
788 bzero(&act, sizeof(act)); 788 bzero(&act, sizeof(act));
789 act.sa_handler = SIG_DFL; 789 act.sa_handler = SIG_DFL;
790 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(sigaction(signal, &act, NULL)); 790 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(sigaction(signal, &act, NULL));
791 } 791 }
792 } 792 }
793 793
794 } // namespace bin 794 } // namespace bin
795 } // namespace dart 795 } // namespace dart
796 796
797 #endif // defined(TARGET_OS_MACOS) 797 #endif // defined(TARGET_OS_MACOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698