Previous Thread
Next Thread
Print Thread
XCALL ASHELL SBX independent #37188 13 Mar 24 09:02 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Hi,

I'm calling a program via "xcall ashell myprog.run" and an sbx via "xcall mysbx.sbx", in both cases the caller program become dependent of the called modules.
Is there any setting to change this?

Thanks


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XCALL ASHELL SBX independent [Re: Jorge Tavares - UmZero] #37189 13 Mar 24 09:50 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
In the first example (which I'm going to assume is really more like xcall HOSTEX, "$ASHELL run myprog", the calling process would normally be suspended until the child process exits. But you could make the child independent of the parent by adding the Command Modifier $ as in:
Code
xcall HOSTEX,"$ASHELL run myprog $"

I'm not sure what to suggest for the second example, since it would be rather unusual for the subroutine to run independently of the parent, since that would require two separate processes, which you don't normally get with an SBX call. The only idea that comes to mind would be if you do want to execute the SBX in another process, you can use a front end, like SBXRUN.LIT (which acts as a wrapper for an XCALL), in which case you're really back to the first syntax, i.e.
Code
xcall HOSTEX,"$ASHELL sbxrun mysbx $"

Or are you looking for a different kind of independence?

Re: XCALL ASHELL SBX independent [Re: Jorge Tavares - UmZero] #37192 14 Mar 24 02:11 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
Oh! of course the $ at the end does the trick but somehow my mind stick that to the xcall amos, not the xcall hostex (and apologize my mistake).
But I don't understand that SBXRUN, I don't have that LIT eek

Last edited by Jorge Tavares - UmZero; 14 Mar 24 02:12 PM.

Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XCALL ASHELL SBX independent [Re: Jorge Tavares - UmZero] #37200 14 Mar 24 03:38 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Sorry, the SBXRUN.LIT that I have is actually Stephen Funkhouser's creation and contains some logic that may not be generally applicable. But the concept is simple - it's basically just something along the lines of...
Code
++pragma FORCE_EXT "LIT"
map1 SBX$,S,10

    SBX$ = CMDLIN
    vxcall SBX$
    end

Re: XCALL ASHELL SBX independent [Re: Jorge Tavares - UmZero] #37201 14 Mar 24 05:21 PM
Joined: Jun 2001
Posts: 3,376
J
Jorge Tavares - UmZero Online Content OP
Member
OP Online Content
Member
J
Joined: Jun 2001
Posts: 3,376
ok, simple and nice, thank you


Jorge Tavares

UmZero - SoftwareHouse
Brasil/Portugal
Re: XCALL ASHELL SBX independent [Re: Jorge Tavares - UmZero] #37202 14 Mar 24 05:40 PM
Joined: Jun 2001
Posts: 11,645
J
Jack McGregor Online Content
Member
Online Content
Member
J
Joined: Jun 2001
Posts: 11,645
Obviously you could get fancier by translating additional command line arguments into additional VXCALL arguments. (Or maybe XFUNC would make that easier, since you could use the same comma-delimited syntax for both the command line and the function call).


Moderated by  Jack McGregor, Ty Griffin 

Powered by UBB.threads™ PHP Forum Software 7.7.3