The cited filename is passed as argv[1] If the filename is "-i" then the command is "/bin/sh -i" This forces an interactive shell. Hence the important of not invoking it as "./-i" -a