*** luke-jr has quit IRC | 00:00 | |
*** luke-jr has joined #maemo | 00:04 | |
*** luke-jr has joined #maemo | 00:05 | |
*** luke-jr has quit IRC | 00:06 | |
*** heroux has quit IRC | 00:07 | |
*** luke-jr has joined #maemo | 00:08 | |
*** luke-jr has quit IRC | 00:11 | |
*** luke-jr has joined #maemo | 00:11 | |
*** Kabouik_ has joined #maemo | 00:14 | |
*** Kabouik has quit IRC | 00:17 | |
*** Alexxxlrus has quit IRC | 00:27 | |
*** xorly has joined #maemo | 00:29 | |
*** Birchy has joined #maemo | 00:32 | |
DocScrutinizer05 | Vajb: in xterm or ssh try "set" | 00:43 |
---|---|---|
DocScrutinizer05 | or maybe better "set|less" | 00:43 |
DocScrutinizer05 | also try man bash|less -j9 +"/A variable may be assigned to" | 00:47 |
DocScrutinizer05 | there yiou got a few screenfull of stuff to read about env vars | 00:47 |
DocScrutinizer05 | unlike windows, in unix a var has a scope only of the current process (shell) and all child spawned by that process. So a usual way to define env vars is to place them into an init script. A child can NOT change values of variables in sibling or parent processes (unlike windows where all vars are system global) | 00:51 |
DocScrutinizer05 | extually you even might need to "export MyVar" to make it available to child processes | 00:53 |
DocScrutinizer05 | actually* | 00:53 |
DocScrutinizer05 | an easy to memorize metaphor is: unix hands down info written into the family Bible and its copies from parent to children. The parents never get to know what the children write (or delete or change) in the Bible. On and on from generation to generation. In contrast to that windows has the env vars written to the chalk board in the classroom and every pupil and the teacher can see what every other person writes, changes or deletes there | 00:57 |
DocScrutinizer05 | HTH | 00:58 |
DocScrutinizer05 | less ~/.profile ~/.bashrc | 01:02 |
*** xes has quit IRC | 01:04 | |
DocScrutinizer05 | also see /etc/init.d/* - PID1 (the very first process and thus parent of all) runs init scripts to start other processes like X11, so an env var defined in that e.g. X11 initscript will be available and visible to X11 process and all its children | 01:07 |
*** xes has joined #maemo | 01:10 | |
*** xorly has quit IRC | 01:17 | |
*** Pali has quit IRC | 01:32 | |
Maxdamantus | So unix is like a religion and Windows is like modern science. | 01:33 |
*** dafox has joined #maemo | 01:35 | |
*** xes has quit IRC | 01:57 | |
*** xes has joined #maemo | 02:09 | |
*** florian has quit IRC | 02:11 | |
*** cyteen has quit IRC | 02:12 | |
*** cyteen has joined #maemo | 02:16 | |
*** xes_ has joined #maemo | 02:23 | |
*** xes has quit IRC | 02:23 | |
*** xes_ is now known as xes | 02:27 | |
*** DocScrutinizer05 has quit IRC | 02:35 | |
*** DocScrutinizer05 has joined #maemo | 02:35 | |
valerius | DocScrutinizer05 I think that you're not right regarding windows. Windows is a system that inherits DOS. Since DOS, it's possible to add env. variables with "set" commands. So, these variables are set in the current shell, and get inherited by child processes. Also, the "root" environment variables can be set in autoexec.bat. This is a gobal env. variables for a "root" shell. DOS had child processes to, and they inherit the environment of the parent | 02:36 |
valerius | . The same is in windows. Parent cannot get its child's environment. But what windows adds is a possibility to redefine a "root" environment (in settings of "My computer" icon). So that, the global environment change takes effect in all process hierarchy, immediately, i.e, without a reboot. So, the intent is to do that without a reboot. Otherwise, it is done the same way as in UNIX. The only difference is the absence of "export" command, but that's | 02:36 |
valerius | because of a different shell. | 02:36 |
DocScrutinizer05 | valerius: you might be right, i'm no windows expert | 02:37 |
valerius | autoexec.bat can be thought of as "init scripts" in DOS | 02:38 |
*** dafox has quit IRC | 02:38 | |
valerius | DocScrutinizer05 me too :) | 02:38 |
DocScrutinizer05 | I'm just pretty sure windows allows global changing of env vars and I know the better half od details how unix works | 02:38 |
DocScrutinizer05 | I never meant to claim parent could get childs env, what I meant was child can't change parent's env | 02:41 |
DocScrutinizer05 | in unix, and it can in windows | 02:41 |
*** eMHa has quit IRC | 02:43 | |
DocScrutinizer05 | I mean I seem to recall in windos you can start an editor of sorts (-> it's a child) to edit global env vars (so owned by (grand)parent) | 02:43 |
valerius | I doubt that. You can only change the root environment with "My Computer" icon. Simple windows processes can't do that. I'm not sure, of course, if a windows program can call an API changing the "root" environment. Maybe, it could, but I cannot tell for sure | 02:43 |
valerius | I'm not a windows expert too :) | 02:44 |
DocScrutinizer05 | well, HOW do you change that? you need a process for doing that and that process is... a child of the process defining the vars, no? | 02:44 |
DocScrutinizer05 | or maybe not even that | 02:45 |
valerius | hm, not sure. Maybe that requires special privileges, and only "explorer" could do that | 02:46 |
DocScrutinizer05 | that's irrelevant for the general architecture | 02:46 |
* valerius needs to ask about that on #reactos ;) | 02:46 | |
DocScrutinizer05 | meh, anyway I'm really not the one to disczuss windows idiosyncrasies with | 02:47 |
valerius | :) | 02:47 |
DocScrutinizer05 | I just tried to give some reference where unix might surprise users that are familiar with the way windows works, the topic was unix env vars though | 02:48 |
DocScrutinizer05 | and you define unix env vars in parent and children inherit a copy basically | 02:48 |
DocScrutinizer05 | children never gave write access to parrent address space | 02:49 |
DocScrutinizer05 | have* - for (env) vars | 02:49 |
valerius | Yes, the question was about the UNIX environment, I agree. But DOS and DOS-based OS'es took this idea from UNIX, so they work the same | 02:50 |
DocScrutinizer05 | parent and child can share a memory segment, env vars are not in such shared segment though | 02:50 |
valerius | yes, that's logical | 02:51 |
DocScrutinizer05 | i think "man fork" and/or "man execve" might have details how parent copies env vars into child's address space | 02:52 |
DocScrutinizer05 | and for a windows user it might be puzzling to not find a whatchacalledit... "root environment with "My Computer" icon" to change env vars | 02:54 |
DocScrutinizer05 | in unix | 02:55 |
valerius | yes, agree | 02:59 |
DocScrutinizer05 | >>The fork() function shall create a new process. The new process (child process) shall be an exact copy of the calling process (parent process) except as detailed below: ... [no env vars mentioned in there, so they are a copy] ...<< | 03:04 |
DocScrutinizer05 | from man 3p fork | 03:04 |
DocScrutinizer05 | well, that's also a pathetic rationale by me, env vars could get stored in any memory range that's world r/w and processes copy pointers to that memory (which is prolly what windows does) | 03:08 |
DocScrutinizer05 | anyway in unix they are not stored in such public place | 03:08 |
*** HRH_H_Crab has quit IRC | 03:14 | |
valerius | Hm, env vars are intended to be copied from parent environment to the child's one. I doubt that they are stored in a public place. I did not thoght it might be too bad in windows. I only thought that the "explorer" process only changes the environment of the whole win32 subsytem, and the changes are then propagated along the process hierarchy (i.e, it's copied down the hierarchy, but not that each process accesses some globally accessible area. That | 03:16 |
valerius | would be too bad even for M$ :)) | 03:16 |
*** infobot has quit IRC | 03:17 | |
*** infobot has joined #maemo | 03:19 | |
DocScrutinizer05 | how are arbitrary processes downstream the explorer hierarchy (read: children of explorer)? | 03:19 |
DocScrutinizer05 | but honestly, this is sort of OT for maemo | 03:20 |
Maxdamantus | Presumably when getting explorer to start a new program, the new process will have a copy of explorers environment, with changes specified by configuration like global variables and variables set in the shortcut, if relevant. | 03:25 |
valerius | DocScrutinizer05 The global environment is somewhere in a "win32" subsystem. Explorer is just a windows task that could configure the whole subsystem settings, including the environment. Maybe, it's changing only its own environment, and that's sufficient, because it starts all other user processes. So, it can be thought as a login shell. So, it could change it's own environment. I'm not sure, how it's gets propagated to all children. | 03:25 |
Maxdamantus | explorer's* | 03:25 |
valerius | Maxdamantus Yes, maybe env changes are propagated only to newly-stared processes, but not the old ones | 03:26 |
*** yosafbridge has quit IRC | 03:27 | |
valerius | *started | 03:29 |
*** heroux has joined #maemo | 03:29 | |
Maxdamantus | I think the general expectation would be that most programs are started through explorer anyway. | 03:29 |
*** DocScrutinizer05 has quit IRC | 03:30 | |
Maxdamantus | unix-like systems don't really have that expectation; if someone starts a program from bash, bash directly forks/execs that program. | 03:30 |
Maxdamantus | instead of sending some message to the init system to start it. | 03:30 |
*** HRH_H_Crab has joined #maemo | 03:31 | |
*** DocScrutinizer05 has joined #maemo | 03:31 | |
Maxdamantus | and if you start it from a file manager, the file manager probably forks/execs .. if you start it from some menubar program, that probably forks/execs, etc | 03:32 |
Maxdamantus | (not that I use file managers or menubars, so might be mistaken as to how they're likely to work) | 03:32 |
*** pkill9 has quit IRC | 03:33 | |
*** yosafbridge has joined #maemo | 03:37 | |
valerius | Maxdamantus hm, I tried to start Far manager in windows, then change the global environment, and then run a compiler from inside Far. It seems, the environment change took an effect in Far's children too, though they are not started directly by explorer. But I'm not sure. | 03:37 |
valerius | Yes, we have gone into offtopic, I agree ;) | 03:37 |
Maxdamantus | Yeah, so I'm wondering if such programs will communicate with explorer to get it to start the program instead of directly calling `SpawnProcess` itself. | 03:38 |
Maxdamantus | Actually, that's probably not right. | 03:44 |
valerius | Anyway, new programs are started by the win32 sybsystem by parent's request. So, explorer could ask the subsystem to change its global environment, so that all programs started get new environment changes from the central place. No matter, which process starts a child. It still needs to call an API from the win32 subsys. So, the sybsys copies env. variables from the parent's environment to child's one, and adds some new global vars from the global | 03:44 |
valerius | environment. So, it just concats the changed global env to theparent's one. Then no env inheritance violation at all | 03:44 |
Maxdamantus | Since I vaguely remember being able to do things like start explorer from the task manager. | 03:44 |
valerius | they are communicating, but not with explorer. They communicate with win32 subsystem, I think | 03:44 |
valerius | yes, task manager can restart explorer -- it seems to be higher in the process hierarchy | 03:45 |
*** tm has quit IRC | 04:57 | |
*** tm has joined #maemo | 05:01 | |
*** Kabouik_ has quit IRC | 05:19 | |
*** Kilroo has quit IRC | 06:09 | |
*** FalconSpy has quit IRC | 06:24 | |
*** FalconSpy has joined #maemo | 06:26 | |
*** povbot has joined #maemo | 06:34 | |
*** oniongarlic has quit IRC | 07:12 | |
*** DocScrutinizer05 has quit IRC | 07:13 | |
*** DocScrutinizer05 has joined #maemo | 07:13 | |
*** vahe has joined #maemo | 07:41 | |
*** vahe has left #maemo | 07:42 | |
*** DarioAlejandro has quit IRC | 08:15 | |
*** cyteen has quit IRC | 08:31 | |
*** ceene has quit IRC | 08:40 | |
*** ceene has joined #maemo | 08:41 | |
*** __LauRoman has quit IRC | 08:49 | |
*** eMHa has joined #maemo | 08:59 | |
*** spiiroin has quit IRC | 09:01 | |
*** cyteen has joined #maemo | 09:05 | |
*** vahe has joined #maemo | 09:18 | |
*** vahe has left #maemo | 09:18 | |
*** jskarvad has joined #maemo | 09:26 | |
*** jskarvad has quit IRC | 09:26 | |
*** jskarvad has joined #maemo | 09:26 | |
*** vahe1 has joined #maemo | 09:30 | |
*** vahe1 has quit IRC | 09:32 | |
*** vahe has joined #maemo | 09:33 | |
*** vahe has left #maemo | 09:36 | |
*** oniongarlic has joined #maemo | 09:37 | |
*** vahe has joined #maemo | 09:43 | |
*** vahe has quit IRC | 09:47 | |
*** ecc3g has quit IRC | 10:21 | |
*** ecc3g has joined #maemo | 10:23 | |
*** geaaru has joined #maemo | 10:25 | |
*** vahe has joined #maemo | 10:30 | |
*** vahe has left #maemo | 10:30 | |
*** Milhouse has quit IRC | 10:44 | |
*** ceene has quit IRC | 11:05 | |
*** ceene has joined #maemo | 11:05 | |
*** TheKit has joined #maemo | 11:20 | |
*** NotKit has quit IRC | 11:23 | |
*** freemangordon_ has joined #maemo | 11:24 | |
*** cyteen has quit IRC | 11:27 | |
*** cyteen has joined #maemo | 11:30 | |
*** florian has joined #maemo | 11:38 | |
*** eMHa has quit IRC | 11:42 | |
*** spiiroin has joined #maemo | 11:46 | |
*** xorly has joined #maemo | 11:49 | |
*** eMHa has joined #maemo | 12:16 | |
*** eMHa has quit IRC | 12:38 | |
*** eMHa has joined #maemo | 12:38 | |
*** xes_ has joined #maemo | 12:39 | |
*** xes has quit IRC | 12:41 | |
*** xes_ is now known as xes | 12:47 | |
*** freemangordon_ has quit IRC | 12:53 | |
*** pkill9 has joined #maemo | 13:07 | |
*** SmilyOrg has joined #maemo | 13:09 | |
*** Smily has quit IRC | 13:09 | |
*** aloril has quit IRC | 13:28 | |
*** aloril has joined #maemo | 13:31 | |
*** dafox has joined #maemo | 13:39 | |
*** qwazix has quit IRC | 14:15 | |
*** qwazix has joined #maemo | 14:19 | |
*** cyteen has quit IRC | 14:22 | |
*** cyteen has joined #maemo | 14:23 | |
*** aloril has quit IRC | 14:24 | |
*** xorly has quit IRC | 14:30 | |
*** aloril has joined #maemo | 14:37 | |
*** jskarvad has quit IRC | 14:37 | |
*** Smily has joined #maemo | 14:54 | |
*** SmilyOrg has quit IRC | 14:54 | |
*** jskarvad has joined #maemo | 15:20 | |
*** jskarvad has quit IRC | 15:20 | |
*** jskarvad has joined #maemo | 15:20 | |
*** aloril has quit IRC | 15:36 | |
*** ceene has quit IRC | 15:39 | |
*** aloril has joined #maemo | 15:43 | |
*** zGrr has joined #maemo | 15:48 | |
*** pkill9 has quit IRC | 15:52 | |
*** xorly has joined #maemo | 16:06 | |
*** varu- has joined #maemo | 16:16 | |
*** varu has quit IRC | 16:17 | |
*** spiiroin has quit IRC | 16:20 | |
*** vakko has joined #maemo | 16:33 | |
*** spiiroin has joined #maemo | 17:17 | |
*** jskarvad has quit IRC | 17:31 | |
*** jskarvad has joined #maemo | 17:43 | |
*** jskarvad has quit IRC | 17:43 | |
*** jskarvad has joined #maemo | 17:43 | |
*** CatButts has joined #maemo | 18:00 | |
CatButts | butts | 18:00 |
* enyc blinks | 18:05 | |
* bencoh mreows | 18:11 | |
*** Kabouik_ has joined #maemo | 18:26 | |
*** LauRoman has joined #maemo | 19:02 | |
*** Hurrian_ has quit IRC | 19:06 | |
*** jskarvad has quit IRC | 19:12 | |
*** Pali has joined #maemo | 19:15 | |
*** florian has quit IRC | 19:17 | |
*** Pali has quit IRC | 19:27 | |
*** Pali has joined #maemo | 19:27 | |
*** zGrr has quit IRC | 19:28 | |
*** Pali has quit IRC | 19:33 | |
*** Pali has joined #maemo | 19:34 | |
*** geaaru has quit IRC | 19:34 | |
*** Pali has quit IRC | 19:35 | |
*** Pali has joined #maemo | 19:35 | |
*** xorly has quit IRC | 19:36 | |
*** Pali has quit IRC | 19:37 | |
*** Pali has joined #maemo | 19:37 | |
*** Pali has quit IRC | 19:41 | |
*** Pali has joined #maemo | 19:42 | |
*** Pali has quit IRC | 19:45 | |
*** Juesto has joined #maemo | 19:45 | |
*** Pali has joined #maemo | 19:46 | |
*** Pali has quit IRC | 19:51 | |
*** Pali has joined #maemo | 19:51 | |
*** Pali has quit IRC | 20:14 | |
*** Pali has joined #maemo | 20:15 | |
*** pkill9 has joined #maemo | 20:27 | |
*** LauRoman has quit IRC | 20:46 | |
*** LauRoman has joined #maemo | 20:54 | |
*** Pali has quit IRC | 21:10 | |
*** Pali has joined #maemo | 21:12 | |
*** xorly has joined #maemo | 21:33 | |
*** Pali has quit IRC | 21:42 | |
*** Pali has joined #maemo | 21:42 | |
*** florian has joined #maemo | 22:06 | |
*** NotKit has joined #maemo | 22:20 | |
*** TheKit has quit IRC | 22:23 | |
*** eMHa has quit IRC | 22:42 | |
*** eMHa has joined #maemo | 23:08 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!