[Info-vax] Backup API mailbox oddity
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Thu Jan 11 11:57:30 EST 2018
On 2018-01-10 22:58:31 +0000, osuvman50 at gmail.com said:
> On Wednesday, January 10, 2018 at 4:25:38 PM UTC-5, Stephen Hoffman wrote:
>> On 2018-01-10 20:39:23 +0000, osuvman50 at gmail.com said:
>>
>> For this case, post some code, and somebody here can have a look.
>
> I shared the code (353 lines) on my google drive:
>
> https://drive.google.com/drive/folders/1egrNe1ZnAnRIl87Jw26sf9O9qs93OVYV?usp=sharing
>
>
> The module that builds the rd_dirlist structure is omitted, two thirds
> of the code in dir_sync.c is setup for the BACKUP$START() call and
> mailbox I/O operations.
>
> I could skip the mailbox I/O by building the backup control structure
> dynamically (with potentially several hundred input files), but
> concatenating control blocks of different sizes didn't appeal to me.
I took a very quick look at the code as a clear-my-head break from some
other ongoing debugging work that's been causing serious headaches
around here.
Based on what I see here, I'd just spawn BACKUP directly and capture
errors via the termination mailbox.
I don't know that the BACKUP API was ever tested with this
mailbox-as-input approach, and it certainly appears that it's not
working or not working very well.
If you want to maintain the use of that that mailbox as a way to pass
in the list of files, then I'd try specifying that mailbox on the
BACKUP DCL command line as the first parameter. Use a leading @. I
suspect a spawn will involve less source code, too.
FWIW, I'd only use $hiber with a $schdwk previously requested, as it's
far too easy to get stuck in a $hiber otherwise. Mentioned as I've
seen apps stall in $hiber due to a missed wake or an unexpected wake
coalescence.
That string upcase logic reminds me; I do need to rummage around for
the current state of ICU support for OpenVMS and for u_strToUpper and
other giblets. Since there are system and RTL calls all over the place
in that code, str$upcase is also an option. Probably a safer approach
is case-blind with strncasecmp or str$case_blind_compare. Though none
of that knows squat about UTF-8. (I only mention any of this as
upcasing and downcasing and string comparisons have nailed code in more
than a few projects, and OpenVMS does have both UTF-8 and VTF-7 strings
lurking in the file naming here, albeit only very obscurely documented.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list