Henrik wrote:
> Why doesn't the child process change the process name after the failed
> execve() ? is it "just history" or is this a feature ?
The process name cannot be changed. THe only way is to create a new process
with a new name.
You can change argv[] for a process from inside but many
> The shell forks, and the child process tries to
> execute child.sh using
> execve(). If this succeeds, the arguments you see in
> ptree show the
> child script. If it fails (because there is no #!
> line), the child
> process interprets the script, but the process args
> still match those of
Henrik wrote:
If you omit the #!/bin/bash from child.sh, I suspect
the original bash will
look at the file, recognize it's executable, but
since the file doesn't
specify a new command interpreter, it's equivalent to
". ./child.sh" meaning
the parent script simply sources the child script.
Not in
> If you omit the #!/bin/bash from child.sh, I suspect
> the original bash will
> look at the file, recognize it's executable, but
> since the file doesn't
> specify a new command interpreter, it's equivalent to
> ". ./child.sh" meaning
> the parent script simply sources the child script.
> Not in
> test.sh:
> #!/usr/bin/bash
> echo "parent"
> ./child.sh
> sleep 120
>
>
> child.sh:
> echo "child
> sleep 120
If you omit the #!/bin/bash from child.sh, I suspect the original bash will
look at the file, recognize it's executable, but since the file doesn't
specify a new command interpreter, i
Hi
I have seen a "weird" behaviour from bash both under Solaris and Linux, most
likely it is a feature but I can't seem to find the answer with google :-\
I have two scripts
test.sh:
#!/usr/bin/bash
echo "parent"
./child.sh
sleep 120
child.sh:
echo "child
sleep 120
If I run the two scripts