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

Side by Side Diff: dart/runtime/bin/process_linux.cc

Issue 125033003: Version 1.1.0-dev.5.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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
« no previous file with comments | « dart/runtime/bin/process_android.cc ('k') | dart/runtime/bin/process_macos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_LINUX) 6 #if defined(TARGET_OS_LINUX)
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 677 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 if (handler->signal() == signal) { 688 if (handler->signal() == signal) {
689 listen = false; 689 listen = false;
690 break; 690 break;
691 } 691 }
692 handler = handler->next(); 692 handler = handler->next();
693 } 693 }
694 if (listen) { 694 if (listen) {
695 struct sigaction act; 695 struct sigaction act;
696 bzero(&act, sizeof(act)); 696 bzero(&act, sizeof(act));
697 act.sa_handler = SignalHandler; 697 act.sa_handler = SignalHandler;
698 sigemptyset(&act.sa_mask);
699 for (int i = 0; i < kSignalsCount; i++) {
700 sigaddset(&act.sa_mask, kSignals[i]);
701 }
698 int status = TEMP_FAILURE_RETRY_BLOCK_SIGNALS( 702 int status = TEMP_FAILURE_RETRY_BLOCK_SIGNALS(
699 sigaction(signal, &act, NULL)); 703 sigaction(signal, &act, NULL));
700 if (status < 0) { 704 if (status < 0) {
701 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[0])); 705 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[0]));
702 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[1])); 706 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(close(fds[1]));
703 return -1; 707 return -1;
704 } 708 }
705 } 709 }
706 if (signal_handlers == NULL) { 710 if (signal_handlers == NULL) {
707 signal_handlers = new SignalInfo(fds[1], signal); 711 signal_handlers = new SignalInfo(fds[1], signal);
(...skipping 29 matching lines...) Expand all
737 bzero(&act, sizeof(act)); 741 bzero(&act, sizeof(act));
738 act.sa_handler = SIG_DFL; 742 act.sa_handler = SIG_DFL;
739 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(sigaction(signal, &act, NULL)); 743 VOID_TEMP_FAILURE_RETRY_BLOCK_SIGNALS(sigaction(signal, &act, NULL));
740 } 744 }
741 } 745 }
742 746
743 } // namespace bin 747 } // namespace bin
744 } // namespace dart 748 } // namespace dart
745 749
746 #endif // defined(TARGET_OS_LINUX) 750 #endif // defined(TARGET_OS_LINUX)
OLDNEW
« no previous file with comments | « dart/runtime/bin/process_android.cc ('k') | dart/runtime/bin/process_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698