File tree 2 files changed +19
-1
lines changed
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,8 @@ class SignalWrap : public HandleWrap {
92
92
if (signum == SIGPROF) {
93
93
Environment* env = Environment::GetCurrent (args);
94
94
if (env->inspector_agent ()->IsStarted ()) {
95
- fprintf (stderr, " process.on(SIGPROF) is reserved while debugging\n " );
95
+ ProcessEmitWarning (env,
96
+ " process.on(SIGPROF) is reserved while debugging" );
96
97
return ;
97
98
}
98
99
}
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+ const common = require ( '../common' ) ;
3
+
4
+ // The inspector attempts to start when Node starts. Once started, the inspector
5
+ // warns on the use of a SIGPROF listener.
6
+
7
+ common . skipIfInspectorDisabled ( ) ;
8
+
9
+ if ( common . isWindows ) {
10
+ common . skip ( 'test does not apply to Windows' ) ;
11
+ return ;
12
+ }
13
+
14
+ common . expectWarning ( 'Warning' ,
15
+ 'process.on(SIGPROF) is reserved while debugging' ) ;
16
+
17
+ process . on ( 'SIGPROF' , ( ) => { } ) ;
You can’t perform that action at this time.
0 commit comments