Several users are associating the exec tag (244 questions) with Find's -exec
option. Find && Exec tagged questions amounts to almost the half of that value (105 questions). The tag's description, however, does not include that meaning:
The exec() family of functions replaces the current process image with a new process image, retaining the pid and pipes of the old process. This tag is also used for the shell built-in which can be used to replace the current shell with a program or various redirection-related stuff.
Should we remove the tag where its usage is inappropriate or would it be preferable to include that meaning to the tag?
-exec
should be tagged with find, not exec. It would be appropriate to correct questions with the wrong sets of tags. If this is best done in bulk or a bit every now and again, I don't know.-exec
is the predicate that tellsfind
to use thoseexec*()
system calls (in addition tofork()
andwait*()
of course), so it's not completely irrelevant. The shell'sexec
is more a no-fork command, so it's less relevant toexec*()
thanfind
's-exec
I'd say.-exec
withfind
, it is afind
issue (syntax, how to find the wanted things, how to loop over results, etc.), not anexec*()
issue.find
. If the exec tag is already used for theexec
special builtin of shell and for theexec*()
system calls, we might as well use it for anything that's namedexec
. I won't argue much more about it, regardless of what it's used for I doubt it will be useful for anything anyway.exec()
system call. There are someexecve()
,execv()
,execveat()
,fexecve()
and there are some standard C API functions around those likeexecl()
,execvp()
... And some languages includingperl
/python
have someexec
function around those. shells' whole raison d'être is to expose that system call to the user. Its ownexec
builtin is to not do it in a child process (with differences in behaviour between implementation when the command is builtin or a function).find
's-exec
is also a wrapper around those (though in a child process).-exec
is not an option offind
, it's a predicate. The options are-H
and-L
(some implementations have more).-exec
is an action predicate in thefind
language likeexec
is an action function in theperl
language. They are both about executing commands. What we need here is drawing the line as to whatexec
is meant to be used for. My personal line is "I don't care much, my only usage of tags is for the watch and ignore tag feature, and I can't see how that tag can be useful to anything".