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.)
|