Conversation
… ports For a command sent to an ARexx port (ENVIR_AMIGA), envir.c passed retstr, the port's RESULT string, to post_process_system_call() as the value of RC. A script testing RC after a successful command with output therefore saw a non-zero string and read failure, and RESULT was never set. ARexx semantics: RC is the host's rm_Result1, RESULT its rm_Result2 string when OPTIONS RESULTS is on. Give RC the number and RESULT the string, for ARexx ports only; other environments keep their existing behaviour. Checked on hosted aarch64 AROS, with the static rexx built from these sources, against a port that returns class codes in rm_Result1 and output in rm_Result2: RC read 0 on success and the exact numeric code on each of eleven refusal classes, with RESULT carrying the output. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
For a command sent to an ARexx port (
ENVIR_AMIGA),envir.cpassedretstr, the port's RESULT string, topost_process_system_call()as the value of RC. So a script that testsRCafter a successful command that returns output sees a non-zero string and reads it as a failure, andRESULTis never set.Fix
ARexx semantics:
RCis the host'srm_Result1, andRESULTis itsrm_Result2string whenOPTIONS RESULTSis on. For ARexx ports only,RCnow gets the number andRESULTthe string. Other environments keep their existing behaviour.Testing
On hosted aarch64 AROS, with the static
rexxbuilt from these sources (the file list and defines ofcontrib-regina-rexx), driving a port that returns class codes inrm_Result1and output inrm_Result2:RC= 0,RESULT= the command's output;RC= the exact numeric code each time;Before the fix, every successful command with output read as a failure.
🤖 Generated with Claude Code