1 |
Hello, |
2 |
|
3 |
On Thu, 2009-07-23 at 08:39 +0530, Nirbheek Chauhan wrote: |
4 |
> It's probably wise to commit code in small-ish (and self-containing) |
5 |
> discrete units each of which add something without breaking anything. |
6 |
> Otherwise, it becomes very difficult to track down which change broke |
7 |
> something via git bisect. I would recommend that you try to do this, |
8 |
> if only just to learn how to make good commits. |
9 |
> |
10 |
|
11 |
Will try to do this from this state on. Starting this week. |
12 |
|
13 |
> You could take a look at how the kernel folks handle this -- features |
14 |
> go in as several small commits/patches. |
15 |
|
16 |
Thanks, will surely look at it. |
17 |
|
18 |
|
19 |
|
20 |
Now, a little call for help to everybody: |
21 |
|
22 |
A child process cannot (or shouldn't be able to) change parent's process |
23 |
environment. |
24 |
|
25 |
uprofile will need to change env var's on-the-fly. For instance tag $PS1 |
26 |
with the current profile in use |
27 |
|
28 |
Reliable options: |
29 |
|
30 |
* Spawn a child shell with the chosen environment |
31 |
os.execv('/bin/bash', []) # can be whatever shell |
32 |
|
33 |
* Wrap uprofile into a /bin/whateversh script that changes environment |
34 |
acording to what child uprofile says. Ugly stuff. |
35 |
|
36 |
Unreliable options: |
37 |
|
38 |
* gdb/similar attach to parent and do some "call"s |
39 |
* wrap watheversh into something that supports env changes from child |
40 |
processes |
41 |
|
42 |
I like the first idea the most even though it's a sub-shell. This method |
43 |
kind of breaks automatic startup of uprofile for HOME. |
44 |
|
45 |
Anyone has a clue on this? Off to sleep... |
46 |
|
47 |
Cheers, |
48 |
Sérgio |
49 |
-- |
50 |
Sérgio Almeida - mephx.x@×××××.com |
51 |
mephx @ freenode |