diff --git a/bin/patchdir b/bin/patchdir index edf82a9..6081d8a 100755 --- a/bin/patchdir +++ b/bin/patchdir @@ -351,7 +351,7 @@ def main(argv): echo "Set PATCHDIR_LOSE_FILES=1 to remove changed files without restoring originals" exit 66 fi - if [ "$1" = "-k" -o -n "$PATCHDIR_KEEP_BACKUP" ]; + if [ "${{1-}}" = "-k" -o -n "${{PATCHDIR_KEEP_BACKUP-}}" ]; then cleanup() {{ echo "Keeping $1" }} diff --git a/install b/install index 2c062a5..87044f2 100755 --- a/install +++ b/install @@ -165,11 +165,7 @@ msg "Linking .config files... ($XDG_CONFIG_HOME)" [[ ${target:t} != ${dest:t} ]] && from=" (${target:t})" if [[ ! -d $target ]]; then color 32 echo " Adding $name$from" - if [[ -L $target ]]; then - cp -P $target $dest - else - relink $target $dest - fi + relink $target $dest else if [[ ! -d $dest ]]; then color 32 echo " Creating directory $name/$from" diff --git a/src/overlayns.cpp b/src/overlayns.cpp index b21d0af..ff3f495 100644 --- a/src/overlayns.cpp +++ b/src/overlayns.cpp @@ -28,6 +28,7 @@ void usage(char const * prog) { "Spec options:\n" " -m mnt-spec Add a mount to the namespace\n" " -o ovl-spec Add an overlay to the namespace\n" + " -N Run in an empty network namespace\n" "\n" "Mount spec:\n" " A mount specification takes the following format:\n" @@ -360,9 +361,10 @@ auto parse_overlay_spec(std::string_view s, config &cfg) -> std::list(cfg.cmdline)); - }, 102400, CLONE_NEWNS); + }, 102400, clone_flags); if (ret) return ret; diff --git a/src/steamns.cpp b/src/steamns.cpp index 41c1421..b01cdcf 100644 --- a/src/steamns.cpp +++ b/src/steamns.cpp @@ -140,9 +140,14 @@ namespace nsproc { while (true) { pid_t w = ::waitpid(-1, NULL, WNOHANG); - if (w == -1) { + if (w == 0) { + break; + } else if (w == -1) { if (errno == ECHILD) break; + else + // XXX: Should this abort? + perror("waitpid"); } } } diff --git a/zsh/zprofile b/zsh/zprofile index 73bbee8..62ba66a 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -111,6 +111,11 @@ if [ -d "$VITASDK/bin" ]; then fi +# +# GOPATH +# +export GOPATH=$HOME/.local/go + # # Paths #