Notes |
(0005441)
steffen (reporter)
2021-08-12 22:51
|
It is .. difficult.
You know, i personally start an instance of my mailx clone on Monday, and quit it on Saturday (Sunday that is already, mostly).
Should the exit status on Saturday reflect a failed delivery attempt on say Tuesday?
For my clone i added options like "set errexit", an "ignerr" command / "-" command escape prefix (to explicitly ignore errors even if "errexit" is active etc etc.
We also have per-command return/exit status and error numbers.
So if we survive errors, the next command will reset the exit status to 0.
It can be said that we are not compliant to the current state of affairs POSIX defines in at least receive mode, on the other hand.
Maybe i should make any occurrence of the send-error bit persistent, and restore it upon program exit, in at least send mode, and at least in conjunction with $POSIXLY_CORRECT aka "set posix". |
|
(0005550)
shware_systems (reporter)
2021-12-09 17:26
|
Re: 5441
As the workarounds for that use case involve extensions, it was felt these extensions are better as a seperate enhancement proposal than affect the issue here. |
|
(0005552)
steffen (reporter)
2021-12-09 19:52
|
Re: 5550
Well i have implemented it now, but any other codebase does not do that, neither BSD Mail nor System V10 mailx?, they all _only_ exit "send-error" in "Send-only mode: send mail "to-addr"(ess) receiver(s)", but not in ""Receive" mode, starting on [-u user], primary *inbox* or [$MAIL]" nor in ""Receive" mode, starting on -f (secondary $MBOX or [file])".
That is only in send-one-mail mode. But it is ok and easily implemented. |
|
(0005553)
steffen (reporter)
2021-12-09 19:59
|
I should have explained myself and the problem better, for sure.
I mean it is ok, since even POSIX mailx can be used to batch-send several messages, and with the outcome of this issue the exit status reflects a "grand total". (*sendwait* should be set.)
But it is surely true that more fine-grained delivery control requires non-trivial work on the codebases, let alone via more generalized concepts like accessible return values, and per-command error suppressing.
My fault, i should have explained my problem better. |
|