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
As per mmsg(7) file names can also be passed as arguments. However, it is presently not checked explicitly whether the specified files actually exist. As such, mblaze utilities exit with a zero exit status even if the specified mail doesn't exist. For example:
$ mblaze -s /does/not/exist
$ echo $?
0
In such cases, an error should be printed and the utility should exit with a non-zero exit status. As briefly discussed on IRC, there is not technical reason why it's presently implemented like that it's just that noone has implemented the proper error handling so far.
The text was updated successfully, but these errors were encountered:
nmeum
added a commit
to nmeum/mblaze
that referenced
this issue
Oct 8, 2024
Sadly, the diff is quite large as we will have to change the API
of `blaze822_loop` to differentiate the number of processed messages
and a status code indicating a missing mail. Note that currently
execution is not aborted upon encountering the first non-existent
mail; hence, we can't do both via the return value.
Surprisingly, very few utilities actually use the number of processed
messages as return by `blaze822_loop`. Therefore, we could reduce the
diff quite a bit by differentiating the two use cases through separate
function (e.g. `blaze822_loop` and `blaze822_loop_num`), which would
allow the API of blaze822_loop to remain largely unchanged.
The new `blaze822_loop` API would also allow us to improve error
handling for blaze822_seq_next but I haven't done this so far.
There are also some tests, but these should be expanded.
Fixesleahneukirchen#264
nmeum
linked a pull request
Oct 8, 2024
that will
close
this issue
As per
mmsg(7)
file names can also be passed as arguments. However, it is presently not checked explicitly whether the specified files actually exist. As such, mblaze utilities exit with a zero exit status even if the specified mail doesn't exist. For example:In such cases, an error should be printed and the utility should exit with a non-zero exit status. As briefly discussed on IRC, there is not technical reason why it's presently implemented like that it's just that noone has implemented the proper error handling so far.
The text was updated successfully, but these errors were encountered: