When I call:
execl("/bin/sh", "/bin/sh", (void *) NULL);
The /bin/sh/ program is started, which opens a shell in which I can type commands. However, if I call:
execl("/bin/sh", "/bin/sh", "~/somescript.sh", (char *) 0 );
The /bin/sh program is also started and runs the given shell script but then closes afterwards.
Why doesn't the shell stay open after running a shell script? Is there anyway to keep it open after running the script?
Thanks in advance!