l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2001 Dec 30 17:07

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Calling a shell pgm from perl to change ENV
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Calling a shell pgm from perl to change ENV

On Wed, 11 Jul 2001 jdnewmil@dcn.davis.ca.us wrote:
> > Of course, I could easily be wrong.  Enlighten me, Jeff...  :)
> I am not enlightened... how could I hope to enlighten you? :)

But you can *juggle*!  Surely a man who can juggle is at one with the
universe and will be kind enough to ease my poor feeble mind.

> I can suggest you read what I wrote again, though. I didn't say "use IPC",
> though putting information in a file for the parent to pick up might be
> construed as a primitive form of IPC.  Perl is certainly capable of most
> forms of IPC, but I am not enough of a shell wizard to suggest how the
> other end of that communication would work. I did suggest that using files
> with predetermined uses might not be a good idea for communicating between
> a child and a parent, in the general case.

Maybe I should have explained myself.  A point I realized but didn't
mention was that all the IPC techniques (including shared files, which I
agree may not be such a hot idea) that I personally am aware of :) have the
same problem: no chance, AFAIK, for communication to get set up on the
parent (shell) end.  I treated the more general case of IPC between shell
and Perl script rather than the more specific case of shared files not--as
far as I am aware, anyway--out of misunderstanding of what you wrote, but
because the same problem is present in the general case.

> Scenario: Perl script touches temporary file (to reserve it), passes it to
> script. Script accepts communication filename as argument, writes
> suggested changes to temporary file as VAR=VALUE pairs. Perl notes
> successful return from script, reads file, and splits the pairs and
> hashes them into %ENV.

Wouldn't that only change the environment variables in the process running
the first Perl script?

> the actual circumstances and your cleverness.  I don't claim to be clever,
> though... this stuff is a continuing learning experience.

No kidding... :)

--nicole twn

"This is my home.  This is my only home.  This is the only sacred ground
that I have ever known."--Dave Carter & Tracy Grammer
Visit Nicolopolis! http://wwwcsif.cs.ucdavis.edu/~carlsonn
nmcarlson@ucdavis.edu ana.ng@tmbg.org carlsonn@seclab.cs.ucdavis.edu

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
Appahost Applications
For a significant contribution towards our projector, and a generous donation to allow us to continue meeting at the Davis Library.