Re: Spawned Address Space Control in tcsh shell

2014-01-09 Thread Hunkeler, Peter
I think of UNIX exec() as the closest thing to MVS XCTL. IMHO, no. exec() is equivalent to end of job step A and start of job step B. You cannot allocate memory before the exec() and pass it to the program invoked by exec(). You can, however, with XCTL. But UNIX processes are different; the

Re: Spawned Address Space Control in tcsh shell

2014-01-09 Thread Paul Gilmartin
On Wed, 8 Jan 2014 23:01:56 -0800, Henry Willard wrote: I believe init (pid 1) becomes the parent. ... I stand corrected, according to experiment with all of OS X, Linux, Solaris, and z/OS. But still, it could provide a model for an alternative to orphans' ABENDing: if the parent ENDs, the

Re: Spawned Address Space Control in tcsh shell

2014-01-09 Thread Walt Farrell
On Thu, 9 Jan 2014 11:34:13 -0600, Paul Gilmartin paulgboul...@aim.com wrote: On Wed, 8 Jan 2014 23:01:56 -0800, Henry Willard wrote: I believe init (pid 1) becomes the parent. ... I stand corrected, according to experiment with all of OS X, Linux, Solaris, and z/OS. But still, it could

Re: Spawned Address Space Control in tcsh shell

2014-01-09 Thread Rob Schramm
Maybe.. something like a new enque level that would allow for child to supercede a parent enque? On Jan 9, 2014 3:20 PM, Walt Farrell walt.farr...@gmail.com wrote: On Thu, 9 Jan 2014 11:34:13 -0600, Paul Gilmartin paulgboul...@aim.com wrote: On Wed, 8 Jan 2014 23:01:56 -0800, Henry Willard

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread Farley, Peter x23353
[mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Rob Schramm Sent: Wednesday, January 08, 2014 11:34 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Spawned Address Space Control in tcsh shell Is there a specific reason (other than it being goofy) that the child could just become the parent? Some sort

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread Tony Harminc
On 8 January 2014 11:47, Farley, Peter x23353 peter.far...@broadridge.com wrote: I have always felt that the parent-goes-away-leaving-the-child-running scenario was the *ix substitution for what we can do with XCTL in z/OS systems. But (as usual) that might just be my wrong-headed view of

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread Paul Gilmartin
On Wed, 8 Jan 2014 11:47:58 -0500, Farley, Peter x23353 wrote: I have always felt that the parent-goes-away-leaving-the-child-running scenario was the *ix substitution for what we can do with XCTL in z/OS systems. Ummm... Not quite. *IX supports the scenario: a) Parent runs for a while, then

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread John McKown
One possibility is to use POSIX threading instead of ATTACH. POSIX threads all run in the same address space. And are actually implemented via TCBs. But there is no parent/child relationship between a thread and a separate thread which a given thread creates. The only special thread is the initial

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread Paul Gilmartin
On Wed, 8 Jan 2014 12:28:13 -0600, John McKown wrote: One possibility is to use POSIX threading instead of ATTACH. POSIX threads all run in the same address space. And are actually implemented via TCBs. But there is no parent/child relationship between a thread and a separate thread which a given

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread Ed Gould
On Jan 8, 2014, at 10:22 PM, Paul Gilmartin wrote: On SNIP-- And, each thread could do its own I/O securely. Almost. There's still the problem of DDNAME contention. Damn! it would be so nice if

Re: Spawned Address Space Control in tcsh shell

2014-01-08 Thread Henry Willard
On 1/8/14, 10:20 AM, Paul Gilmartin wrote: On Wed, 8 Jan 2014 11:47:58 -0500, Farley, Peter x23353 wrote: I have always felt that the parent-goes-away-leaving-the-child-running scenario was the *ix substitution for what we can do with XCTL in z/OS systems. Ummm... Not quite. *IX supports

Re: Spawned Address Space Control in tcsh shell

2013-12-31 Thread Paul Gilmartin
On Mon, 30 Dec 2013 19:03:38 -0800, Roger Steyn wrote: John , This talks about the _BPX_SHAREAS environment variable. This environment variable is not mentioned anywhere in the documentation of tcsh.� Your are right . BPX_SHAREAS cannot be used for tcsh . It is documented in USS planning

Re: Spawned Address Space Control in tcsh shell

2013-12-31 Thread Rob Schramm
This whole share areas thing is annoying at best. And confounding and time consuming at the worst. Has anyone at IBM thought of a way to actually fix this in a more functional way? Winning friends and influencing with my tactful opinions, *grin* Rob Schramm On Dec 31, 2013 8:21 AM, Paul

Re: Spawned Address Space Control in tcsh shell

2013-12-31 Thread Kirk Wolf
To be technical, /bin/sh isn't _BPX_SHAREAS aware. It uses spawn() rather than fork()/exec() in many cases. When using spawn(), _BPX_SHAREAS controls whether a local spawn is down. The best documentation on _BPX_SHAREAS is in the z/OS Unix Assembler Callable Services Guide - under BPX1SPN.

Re: Spawned Address Space Control in tcsh shell

2013-12-31 Thread Paul Gilmartin
On Tue, 31 Dec 2013 12:24:23 -0500, Rob Schramm wrote: This whole share areas thing is annoying at best. And confounding and time consuming at the worst. Has anyone at IBM thought of a way to actually fix this in a more functional way? Winning friends and influencing with my tactful opinions,

Re: Spawned Address Space Control in tcsh shell

2013-12-31 Thread Tony Harminc
On 31 December 2013 13:23, Paul Gilmartin paulgboul...@aim.com wrote: Most (?) of the complaints about (non-)shared areas stem from the non-propagation of DDNAMEs through fork(). Ain't gonna get better (NVFL, anyway). Because of ENQ conflicts between parent and child. Extend the ENQ scope to

Spawned Address Space Control in tcsh shell

2013-12-30 Thread Mark Jacobs
I was trying to execute a batch cozsftp command using tcsh as the shell, and my dataset allocation (to send a file to an sftp server) kept on failing, either with an unable to stat DD, or when I attempted to allocate the dynamically allocate the dataset, that allocation failed due to it being

Re: Spawned Address Space Control in tcsh shell

2013-12-30 Thread John McKown
This is my take on it. I am not an expert. Nor do I have access to the actual source code. I don't believe that tcsh will do what you want. My reasoning is below. In order to run a process in the same address space, the code must use the spawn() function. I base this assertion on

Re: Spawned Address Space Control in tcsh shell

2013-12-30 Thread Mark Jacobs
Thanks for the reply. I changed to tcsh since it seems to work better than /bin/sh when I ssh to OMVS from my FreeBSD 9.2 workstation. Mark Jacobs On 12/30/13 08:51, John McKown wrote: This is my take on it. I am not an expert. Nor do I have access to the actual source code. I don't believe

Re: Spawned Address Space Control in tcsh shell

2013-12-30 Thread Paul Gilmartin
On Mon, 30 Dec 2013 07:51:28 -0600, John McKown wrote: I note that the description of the fork() function does not mention _BPX_SHAREAS at all. I therefore conclude that a fork() will always result in a new address space. It must, in order that pointers in the child process space validly point

Re: Spawned Address Space Control in tcsh shell

2013-12-30 Thread Paul Gilmartin
On Mon, 30 Dec 2013 09:16:29 -0500, Mark Jacobs wrote: Thanks for the reply. I changed to tcsh since it seems to work better than /bin/sh when I ssh to OMVS from my FreeBSD 9.2 workstation. Examples? -- gil -- For IBM-MAIN

Re: Spawned Address Space Control in tcsh shell

2013-12-30 Thread Roger Steyn
John , This talks about the _BPX_SHAREAS environment variable. This environment variable is not mentioned anywhere in the documentation of tcsh.  Your are right . BPX_SHAREAS cannot be used for tcsh . It is documented in USS planning guide . _BPX_SHAREAS Specifies whether the spawned