-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
code healthImprove code readability, simplify maintenance and so onImprove code readability, simplify maintenance and so on
Description
Lines 94 to 102 in f8a1c10
| function Process.kill_pid(pid, signal, options) | |
| checks('number|string', '?number|string', {quiet = '?boolean'}) | |
| -- Signal values are platform-dependent so we can not use ffi here | |
| signal = signal or 15 | |
| local exit_code = os.execute('kill -' .. signal .. ' ' .. pid .. ' 2> /dev/null') | |
| if exit_code ~= 0 and not (options and options.quiet) then | |
| error('kill failed: ' .. exit_code) | |
| end | |
| end |
Tarantool provides signal name to signal number mapping since the 2.4.1 version. We can use it if available and fallback to os.execute() on older versions.
Metadata
Metadata
Assignees
Labels
code healthImprove code readability, simplify maintenance and so onImprove code readability, simplify maintenance and so on