[Info-vax] Creating an open source version of VMS, was: Re: OpenVMS Hobbyist Notification
VAXman- at SendSpamHere.ORG
VAXman- at SendSpamHere.ORG
Thu Mar 12 15:06:27 EDT 2020
In article <r4du7u$hat$1 at dont-email.me>, Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP> writes:
>On 2020-03-12, VAXman- @SendSpamHere.ORG <VAXman- at SendSpamHere.ORG> wrote:
>> In article <r4c3bd$8fa$1 at dont-email.me>, Simon Clubley <clubley at remove_me.eisner.decus.org-Earth.UFP> writes:
>>>
>>>Maybe, but I could see it being a problem to a few people.
>>>
>>>Two possible ways around this:
>>>
>>>1) The returned PID is actually that of the parent shell PID and you
>>>use another value (such as REAL_PID or MY_PID) to get your own PID.
>>>
>>>2) You add another option, called SPID or similar, to get the parent
>>>shell PID and change your command procedure to use that instead on
>>>the rare occasion you need something like this.
>>>
>>>I do not like option 1 as it is a hack and option 2 feels way cleaner.
>>>Option 2 is also the same as the $$ syntax in bash.
>>
>> I prefer the option of understand the OS and the APIs provided. How the
>> FiretrUCK would you do it on unix with everything being is own process?
>>
>
>You use the PID of the parent shell itself. That's what the $$ variable
>in bash contains.
... and, ergo, you've answered your own complaint about writing code on VMS
without having a clue.
--
VAXman- A Bored Certified VMS Kernel Mode Hacker VAXman(at)TMESIS(dot)ORG
I speak to machines with the voice of humanity.
More information about the Info-vax
mailing list