{"image_url":null,"author_url":"https://blog.hatena.ne.jp/nonylene/","blog_url":"https://nonylene.hatenablog.jp/","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fnonylene.hatenablog.jp%2Fentry%2F2022%2F01%2F17%2F231301\" title=\"Python \u306e subprocess.run \u306f KeyboardInterrupt \u3067\u5f37\u5236\u7684\u306b kill \u3055\u308c\u308b - Unyablog.\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"Python \u304b\u3089 Terraform \u3092\u30a4\u30f3\u30bf\u30e9\u30af\u30c6\u30a3\u30d6\u306a\uff08stdin \u3092\u305d\u306e\u307e\u307e\u6e21\u3059\uff09\u5f62\u3067\u547c\u3076\u305f\u3081\u306b\u3001subprocess.run \u3092\u4f7f\u3063\u3066 subprocess \u3067\u8d70\u3089\u305b\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u3002 \u3053\u3053\u3067\u3001 Ctrl-C (KeyboardInterrupt) \u306e\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u304c\u30cd\u30c3\u30af\u306b\u306a\u308b\u3002 Terraform \u306f Ctrl-C \u3092\u6253\u3064\u3068 Graceful \u306a\u7d42\u4e86\u3092\u8a66\u307f\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001Ctrl-C \u304c\u6253\u305f\u308c\u3066\u3082\u3057\u3070\u3089\u304f subprocess \u3092\u7d42\u4e86\u3057\u306a\u3044\u3088\u3046\u306b\u3057\u305f\u3044\u3002 try \u3067\u56f2\u3093\u3067 except KeyboardInterrupt \u3059\u308c\u3070\u5b9f\u73fe\u3067\u304d\u305d\u3046\u3060\u304c\u3001\u6b8b\u5ff5\u306a\u304c\u3089 subprocess.r\u2026","blog_title":"Unyablog.","type":"rich","published":"2022-01-17 23:13:01","provider_name":"Hatena Blog","categories":["Python"],"url":"https://nonylene.hatenablog.jp/entry/2022/01/17/231301","provider_url":"https://hatena.blog","version":"1.0","author_name":"nonylene","title":"Python \u306e subprocess.run \u306f KeyboardInterrupt \u3067\u5f37\u5236\u7684\u306b kill \u3055\u308c\u308b","height":"190"}