Skip to content

Commit

Permalink
fix argv0 not being passed to ForkExec
Browse files Browse the repository at this point in the history
also
- changes examples to include the aws-nitro-util in `../` rather than fetching it from github
- adds arg to example so we show using arguments in `cmd`
  • Loading branch information
cottand committed Jul 31, 2024
1 parent 7591f28 commit f1a245a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
15 changes: 6 additions & 9 deletions examples/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

nitro-util.url = "github:monzo/aws-nitro-util";
nitro-util.url = "path:../";
nitro-util.inputs.nixpkgs.follows = "nixpkgs";

flake-utils.url = "github:numtide/flake-utils";
Expand Down
8 changes: 6 additions & 2 deletions examples/withShellScript.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let
while true;
do
echo "hello there!";
echo "hello there $1 !";
sleep 3;
done
'';
Expand All @@ -33,6 +33,10 @@ nitro.buildEif {
pathsToLink = [ "/bin" ];
};

entrypoint = "/bin/hello";
entrypoint = ''
/bin/hello
nico
'';

env = "";
}
2 changes: 1 addition & 1 deletion init/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func main() {
die("failed to init cgroups", err)
}

pid, err := launch(cmd[0], cmd[1:], env)
pid, err := launch(cmd[0], cmd, env)

if err != nil {
die("failed to launch", err)
Expand Down

0 comments on commit f1a245a

Please sign in to comment.