Skip to content
Update debugging authored by umaumax's avatar umaumax
......@@ -2,7 +2,7 @@
## ワークアラウンド
### `⭐``⭐``⭐` root権限無しで、`/etc/hosts`ファイルの上書き相当の処理を実行する
### `⭐⭐` root権限無しで、`/etc/hosts`ファイルの上書き相当の処理を実行する
[dns - associate IP with hostname without editing /etc/hosts - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/714953/associate-ip-with-hostname-without-editing-etc-hosts)
......@@ -11,6 +11,10 @@ TMP_HOSTS_FILEPATH=./tmp_etc_hosts # 相対パスでもOK
unshare --mount --map-root-user bash -c "mount --bind --make-private "$TMP_HOSTS_FILEPATH" /etc/hosts; ping hoge.example.com"
```
### プロセスが落ちるときにアタッチしてデバッグしたい
シグナルハンドラの中で無限ループさせると、後からgdbでアタッチできる
## デバッグについて
### 種類
......
......