it's ensuringIt ensures that the command is taking "nothing" as the input.
an example:
cat /dev/null > file.txt
# is the same as
printf '' > file.txt
would have the same result as deleting all the lines from a fileI/O streams are accounted for.
guesses about myprogram:
- it could optionally accept something from stdin that it would prepend to
foo.out; in this it's specifying that nothing's extra should be prepended.
- the author wants to to make sure that they're locking down all streams
the later is the goal in the example mentioned; it ensures that there can be no ties to This way, the backgrounded process so that it won't cause any trouble on logout. Basically, it making sure that there'shas nothing "tied" to keep the terminal hung, so you can launch a backgroundgo about your business like you didn't do anything; nothing gets hung.
In this case, since you're launching the process over ssh from inside a shell script, it's making sure that this unfinished process does not maintain any tiesthere's nothing in that will keepcommand that would prevent the session openscript from moving on.