in reply to Gathering current ksh shell aliases in perl
Unix OS don't have much of an API to introspect another process - and certainly not not for things that are very program specific. Just as ikegami said, if the parent process doesn't tell, there's no way to retrieve that bit of information. (Well, I guess that if your program runs as root, you may be able to poke around in a process memory - given enough knowledge of the internals of the version of your ksh, you could in theory reconstruct the aliases. But I wouldn't recommend that.)
Re^2: Gathering current ksh shell aliases in perl
by pobocks (Chaplain) on Apr 27, 2010 at 03:30 UTC
|
Just out of curiosity, what operating systems do have that kind of API?
I vaguely recall Plan 9 having some level of FS type access to process internal state, but I may be pulling that out of the ether.
for(split(" ","tsuJ rehtonA lreP rekcaH")){print reverse . " "}print "\b.\n";
| [reply] [d/l] |
|
| [reply] |
|