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

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

Issue 2779373004: [dart:io][windows] Set the last error when a signal is unsupported (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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 #if !defined(DART_IO_DISABLED) 5 #if !defined(DART_IO_DISABLED)
6 6
7 #include "platform/globals.h" 7 #include "platform/globals.h"
8 #if defined(HOST_OS_WINDOWS) 8 #if defined(HOST_OS_WINDOWS)
9 9
10 #include "bin/process.h" 10 #include "bin/process.h"
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 return CTRL_C_EVENT; 976 return CTRL_C_EVENT;
977 default: 977 default:
978 return -1; 978 return -1;
979 } 979 }
980 } 980 }
981 981
982 982
983 intptr_t Process::SetSignalHandler(intptr_t signal) { 983 intptr_t Process::SetSignalHandler(intptr_t signal) {
984 signal = GetWinSignal(signal); 984 signal = GetWinSignal(signal);
985 if (signal == -1) { 985 if (signal == -1) {
986 SetLastError(ERROR_NOT_SUPPORTED);
986 return -1; 987 return -1;
987 } 988 }
988 989
989 // Generate a unique pipe name for the named pipe. 990 // Generate a unique pipe name for the named pipe.
990 wchar_t pipe_name[kMaxPipeNameSize]; 991 wchar_t pipe_name[kMaxPipeNameSize];
991 int status = GenerateNames<1>(&pipe_name); 992 int status = GenerateNames<1>(&pipe_name);
992 if (status != 0) { 993 if (status != 0) {
993 return status; 994 return status;
994 } 995 }
995 996
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 } 1051 }
1051 delete handler; 1052 delete handler;
1052 } 1053 }
1053 1054
1054 } // namespace bin 1055 } // namespace bin
1055 } // namespace dart 1056 } // namespace dart
1056 1057
1057 #endif // defined(HOST_OS_WINDOWS) 1058 #endif // defined(HOST_OS_WINDOWS)
1058 1059
1059 #endif // !defined(DART_IO_DISABLED) 1060 #endif // !defined(DART_IO_DISABLED)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698