mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
fuckport: just kill
This commit is contained in:
parent
c7442dfa27
commit
46ffc72785
1 changed files with 2 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ writers.writeHaskellBin "fuckport"
|
|||
|
||||
loadFromBins ["${lsof}", "${coreutils}", "${jc}"]
|
||||
|
||||
data LsofRow = LsofRow
|
||||
data LsofRow = LsofRow
|
||||
{ command :: String
|
||||
, pid :: Int
|
||||
, user :: String
|
||||
|
|
@ -35,5 +35,5 @@ writers.writeHaskellBin "fuckport"
|
|||
let v = fromJust $ decode @[LsofRow] s
|
||||
forM_ v $ \r -> do
|
||||
putStrLn $ "Killing " <> show (pid r) <> " (" <> command r <> ")"
|
||||
kill $ pid r
|
||||
kill ["-KILL", show (pid r)]
|
||||
''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue