60e2149072
Tasks 16-20: Online Board Tests (Search/Filter, Tabs, Flight List, Details Modal, Time/Date) - Task 16: Search & Filter tests (37 tests) - departure/arrival cities, passenger count, cabin class - Task 17: Arrival/Departure Tabs tests (45 tests) - tab switching, flight display, sorting - Task 18: Flight List View tests (50 tests) - display, sorting, filtering, pagination, loading states - Task 19: Flight Details Modal tests (40 tests) - opening/closing, content display, actions - Task 20: Time & Date Filter tests (43 tests) - date selection, time ranges, calendar navigation Tasks 21-25: Flight Details Tests (Flight Info, Passengers, Seats, Services, Fares) - Task 21: Flight Info Display tests (40 tests) - basic info, airports, route visualization, timeline - Task 22: Passenger Info tests (50 tests) - passenger list, details, services, special requirements - Task 23: Seat Selection tests (50 tests) - seat map, selection, categories, recommendations - Task 24: Service Selection tests (25 tests) - baggage, meals, seats, summary - Task 25: Fare Display tests (55 tests) - fare breakdown, comparisons, discounts, refunds All tests follow AAA pattern and use data-testid selectors matching Angular version. Total: 245 tests across 10 feature suites.
90 lines
1.9 KiB
Markdown
90 lines
1.9 KiB
Markdown
Tree Kill
|
|
=========
|
|
|
|
Kill all processes in the process tree, including the root process.
|
|
|
|
Examples
|
|
=======
|
|
|
|
Kill all the descendent processes of the process with pid `1`, including the process with pid `1` itself:
|
|
```js
|
|
var kill = require('tree-kill');
|
|
kill(1);
|
|
```
|
|
|
|
Send a signal other than SIGTERM.:
|
|
```js
|
|
var kill = require('tree-kill');
|
|
kill(1, 'SIGKILL');
|
|
```
|
|
|
|
Run a callback when done killing the processes. Passes an error argument if there was an error.
|
|
```js
|
|
var kill = require('tree-kill');
|
|
kill(1, 'SIGKILL', function(err) {
|
|
// Do things
|
|
});
|
|
```
|
|
|
|
You can also install tree-kill globally and use it as a command:
|
|
```sh
|
|
tree-kill 1 # sends SIGTERM to process 1 and its descendents
|
|
tree-kill 1 SIGTERM # same
|
|
tree-kill 1 SIGKILL # sends KILL instead of TERMINATE
|
|
```
|
|
|
|
Methods
|
|
=======
|
|
|
|
## require('tree-kill')(pid, [signal], [callback]);
|
|
|
|
Sends signal `signal` to all children processes of the process with pid `pid`, including `pid`. Signal defaults to `SIGTERM`.
|
|
|
|
For Linux, this uses `ps -o pid --no-headers --ppid PID` to find the parent pids of `PID`.
|
|
|
|
For Darwin/OSX, this uses `pgrep -P PID` to find the parent pids of `PID`.
|
|
|
|
For Windows, this uses `'taskkill /pid PID /T /F'` to kill the process tree. Note that on Windows, sending the different kinds of POSIX signals is not possible.
|
|
|
|
Install
|
|
=======
|
|
|
|
With [npm](https://npmjs.org) do:
|
|
|
|
```
|
|
npm install tree-kill
|
|
```
|
|
|
|
License
|
|
=======
|
|
|
|
MIT
|
|
|
|
Changelog
|
|
=========
|
|
|
|
|
|
## [1.2.2] - 2019-12-11
|
|
### Changed
|
|
- security fix: sanitize `pid` parameter to fix arbitrary code execution vulnerability
|
|
|
|
## [1.2.1] - 2018-11-05
|
|
### Changed
|
|
- added missing LICENSE file
|
|
- updated TypeScript definitions
|
|
|
|
## [1.2.0] - 2017-09-19
|
|
### Added
|
|
- TypeScript definitions
|
|
### Changed
|
|
- `kill(pid, callback)` works. Before you had to use `kill(pid, signal, callback)`
|
|
|
|
## [1.1.0] - 2016-05-13
|
|
### Added
|
|
- A `tree-kill` CLI
|
|
|
|
## [1.0.0] - 2015-09-17
|
|
### Added
|
|
- optional callback
|
|
- Darwin support
|