PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, August 21, 2022

[FIXED] How to set an environment variable in escript or Erlang

 August 21, 2022     bash, environment-variables, erlang     No comments   

Issue

Can I set an environment variable when executing an escript script so that the environment variable can be read by other applications executing in the same environment (so effectively is there an equivalent of bash command export available in escript or Erlang)?


Solution

A process cannot affect the environment of its parent or of its parent's other child processes.

If you want to modify the environment for processes started by your script (via fork or something similar, although OP informs me this is not supported), there is probably something like setenv available.



Answered By - chepner
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing