This is a discussion on Re: pkill.c warn when "no such process" within the mailing.openbsd.tech forums, part of the OpenBSD category; --> On 2/21/08, Heinrich Rebehn <rebehn@ant.uni-bremen.de> wrote: > $ rm xxxx.* > rm: xxxx.*: No such file or directory > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 2/21/08, Heinrich Rebehn <rebehn@ant.uni-bremen.de> wrote: > $ rm xxxx.* > rm: xxxx.*: No such file or directory > Who says it's an error ? rm tried to delete all (in this case, none) > files matched. > > Would you like to check the return status after every command issued > just to rule out typos? For commands that are given a specific, identifiable target, no. For commands that are provided a pattern, yes. There is a difference between commands like kill and pkill. By providing a single pid to kill, you are indicating that you know exactly which process you want killed. The fact that you know its identity is ample evidence to imply that you know it exists. pkill takes a pattern, implying that you do not know which particular process you want killed. There is no evidence that you even know a matching process exists, so pkill should not report an error. |