GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — doc: add note for handling signal events in trace events · nodejs/node@0805068

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • tracing.md
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/tracing.md‎

Copy file name to clipboardExpand all lines: doc/api/tracing.md
+11Lines changed: 11 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ string that supports `${rotation}` and `${pid}`:
8080
node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
8181
```
8282

83+
To guarantee that the log file is properly generated after signal events like
84+
`SIGINT`, `SIGTERM`, or `SIGBREAK`, make sure to have the appropriate handlers
85+
in your code, such as:
86+
87+
```js
88+
process.on('SIGINT', function onSigint() {
89+
console.info('Received SIGINT.');
90+
process.exit(130); // Or applicable exit code depending on OS and signal
91+
});
92+
```
93+
8394
The tracing system uses the same time source
8495
as the one used by `process.hrtime()`.
8596
However the trace-event timestamps are expressed in microseconds,

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.