You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* Delete the output file length to zero if already exists. */
remove (argv [argc - 1]);
Note the confusing comment: perhaps it used to truncate the file to zero if it existed;
now it unlinks the file from the filesystem, which means it will get removed once the program terminates.
Apparently, there is no reason to do that: if it exists, it will get overwritten.
Even if the one that exists is longer, it will get (correctly) overwritten by a new shorter one,
i.e. it is not like the rest of the old long one remains.
strace shows the output file being unlinked after being opened.
test.txt
The text was updated successfully, but these errors were encountered: